Sha256: 4749700a59adb374d72038bc2ff5a5ef67d273e86200d297d9493f88ae5ab2cb

Contents?: true

Size: 1.58 KB

Versions: 90

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 = AWS[: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 = AWS[:ec2].describe_images('ImageId' => GENTOO_AMI)
      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

90 entries across 90 versions & 1 rubygems

Version Path
fog-0.2.18 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.17 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.16 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.15 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.14 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.13 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.12 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.11 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.10 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.9 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.8 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.7 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.6 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.5 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.4 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.3 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.2 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.1 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.2.0 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.1.10 spec/aws/requests/ec2/describe_images_spec.rb