Sha256: cfab1735e3b3c5c9d8417ab994151847783392243d5bba965dccd98f0401d0c7

Contents?: true

Size: 530 Bytes

Versions: 17

Compression:

Stored size: 530 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper'

describe 'Slicehost.get_image' do
  describe 'success' do

    it "should return proper attributes" do
      actual = Slicehost[:slices].get_image.body
      actual['id'].should be_an(Integer)
      actual['name'].should be_a(String)
    end

  end

  describe 'failure' do

    it "should raise a Forbidden error if the flavor does not exist" do
      lambda {
        Slicehost[:slices].get_image(0)
      }.should raise_error(Excon::Errors::Forbidden)
    end

  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
fog-0.0.59 spec/slicehost/requests/get_image_spec.rb
fog-0.0.58 spec/slicehost/requests/get_image_spec.rb
fog-0.0.57 spec/slicehost/requests/get_image_spec.rb
fog-0.0.56 spec/slicehost/requests/get_image_spec.rb
fog-0.0.55 spec/slicehost/requests/get_image_spec.rb
fog-0.0.54 spec/slicehost/requests/get_image_spec.rb
fog-0.0.53 spec/slicehost/requests/get_image_spec.rb
fog-0.0.52 spec/slicehost/requests/get_image_spec.rb
fog-0.0.51 spec/slicehost/requests/get_image_spec.rb
fog-0.0.50 spec/slicehost/requests/get_image_spec.rb
fog-0.0.49 spec/slicehost/requests/get_image_spec.rb
fog-0.0.48 spec/slicehost/requests/get_image_spec.rb
fog-0.0.47 spec/slicehost/requests/get_image_spec.rb
fog-0.0.46 spec/slicehost/requests/get_image_spec.rb
fog-0.0.45 spec/slicehost/requests/get_image_spec.rb
fog-0.0.44 spec/slicehost/requests/get_image_spec.rb
fog-0.0.43 spec/slicehost/requests/get_image_spec.rb