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.0.50 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.49 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.48 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.47 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.46 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.45 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.44 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.43 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.42 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.41 spec/aws/requests/ec2/describe_images_spec.rb