Sha256: e78f473da2e46b7e86f542e2a7b74ca86f7643ac9f6ca88f981776d5ec434864

Contents?: true

Size: 1.58 KB

Versions: 22

Compression:

Stored size: 1.58 KB

Contents

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

describe 'EC2.describe_images' do
  describe 'success' do

    it "should return proper attributes with no params" do
      actual = ec2.describe_images
      actual.body['requestId'].should be_a(String)
      image = actual.body['imagesSet'].first
      image['architecture'].should be_a(String)
      image['imageId'].should be_a(String)
      image['imageLocation'].should be_a(String)
      image['imageOwnerId'].should be_a(String)
      image['imageState'].should be_a(String)
      image['imageType'].should be_a(String)
      [false, true].should include(image['isPublic'])
      image['kernelId'].should be_a(String) if image['kernelId']
      image['platform'].should be_a(String) if image['platform']
      image['ramdiskId'].should be_a(String) if image['ramdiskId']
    end
  
    it "should return proper attributes with params" do
      actual = ec2.describe_images('ImageId' => 'ami-5ee70037')
      actual.body['requestId'].should be_a(String)
      image = actual.body['imagesSet'].first
      image['architecture'].should be_a(String)
      image['imageId'].should be_a(String)
      image['imageLocation'].should be_a(String)
      image['imageOwnerId'].should be_a(String)
      image['imageState'].should be_a(String)
      image['imageType'].should be_a(String)
      [false, true].should include(image['isPublic'])
      image['kernelId'].should be_a(String) if image['kernelId']
      image['platform'].should be_a(String) if image['platform']
      image['ramdiskId'].should be_a(String) if image['ramdiskId']
    end

  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
fog-0.0.24 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.23 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.22 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.21 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.20 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.19 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.18 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.17 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.16 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.15 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.14 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.13 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.12 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.11 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.10 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.9 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.8 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.7 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.6 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.5 spec/aws/requests/ec2/describe_images_spec.rb