Sha256: 890385d48ddf7ce049d2fabf5732639ab21e8eaaf9066d0125ab2adf8127453d

Contents?: true

Size: 1.57 KB

Versions: 16

Compression:

Stored size: 1.57 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' => 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

16 entries across 16 versions & 1 rubygems

Version Path
fog-0.0.40 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.39 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.38 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.37 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.36 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.35 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.34 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.33 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.32 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.31 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.30 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.29 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.28 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.27 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.26 spec/aws/requests/ec2/describe_images_spec.rb
fog-0.0.25 spec/aws/requests/ec2/describe_images_spec.rb