Sha256: 3684767c89764d8d114e1bddb0f75cedeefb53a28692779b8c484b16d19312c0

Contents?: true

Size: 718 Bytes

Versions: 19

Compression:

Stored size: 718 Bytes

Contents

require 'spec_helper'

describe Profitbricks::Image do
  include Savon::Spec::Macros

  it "should find all images" do
    savon.expects(:get_all_images).returns(:success)
    Image.all.count.should == 7
  end

  it "should find an image by name" do 
  	savon.expects(:get_all_images).returns(:success)
  	image = Image.find(:name => "Windows8-ConsumerPreview-64bit-English.iso")
    image.os_type.should == "UNKNOWN"
  end

  it "should update the os_type" do
    savon.expects(:get_all_images).returns(:success)
    savon.expects(:set_image_os_type).returns(:success)
    image = Image.find(:name => "Windows8-ConsumerPreview-64bit-English.iso")
    image.set_os_type("WINDOWS").os_type.should == "WINDOWS"
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
profitbricks-0.9.9 spec/profitbricks/image_spec.rb
profitbricks-0.9.8 spec/profitbricks/image_spec.rb
profitbricks-0.9.7 spec/profitbricks/image_spec.rb
profitbricks-0.9.6 spec/profitbricks/image_spec.rb
profitbricks-0.9.5 spec/profitbricks/image_spec.rb
profitbricks-0.9.4 spec/profitbricks/image_spec.rb
profitbricks-0.9.3 spec/profitbricks/image_spec.rb
profitbricks-0.9.2 spec/profitbricks/image_spec.rb
profitbricks-0.9.1 spec/profitbricks/image_spec.rb
profitbricks-0.9.0 spec/profitbricks/image_spec.rb
profitbricks-0.5.1 spec/profitbricks/image_spec.rb
profitbricks-0.5.0 spec/profitbricks/image_spec.rb
profitbricks-0.4.1 spec/profitbricks/image_spec.rb
profitbricks-0.4.0 spec/profitbricks/image_spec.rb
profitbricks-0.0.5 spec/profitbricks/image_spec.rb
profitbricks-0.0.4 spec/profitbricks/image_spec.rb
profitbricks-0.0.3 spec/profitbricks/image_spec.rb
profitbricks-0.0.2 spec/profitbricks/image_spec.rb
profitbricks-0.0.1 spec/profitbricks/image_spec.rb