Sha256: 2c86bb77c128ec89cf3c9928f9ce833ce1e79f5d7f4a96cc83e0ce422526fc61
Contents?: true
Size: 1.63 KB
Versions: 4
Compression:
Stored size: 1.63 KB
Contents
require File.dirname(__FILE__) + '/../../../spec_helper' describe 'Fog::AWS::EC2::Snapshots' do describe "#all" do it "should return a Fog::AWS::EC2::Snapshots" do ec2.snapshots.all.should be_a(Fog::AWS::EC2::Snapshots) end it "should include persisted snapshots" do volume = ec2.volumes.create snapshot = volume.snapshots.create ec2.snapshots.get(snapshot.snapshot_id).should_not be_nil snapshot.destroy end end describe "#create" do before(:each) do @volume = ec2.volumes.create @snapshot = @volume.snapshots.create end after(:each) do @snapshot.destroy @volume.destroy end it "should return a Fog::AWS::EC2::Snapshot" do @snapshot.should be_a(Fog::AWS::EC2::Snapshot) end it "should exist on ec2" do ec2.snapshots.get(@snapshot.snapshot_id).should_not be_nil end end describe "#get" do it "should return a Fog::AWS::EC2::Snapshot if a matching snapshot exists" do volume = ec2.volumes.create snapshot = volume.snapshots.create get = ec2.snapshots.get(snapshot.snapshot_id) snapshot.attributes.should == get.attributes snapshot.destroy end it "should return nil if no matching address exists" do ec2.snapshots.get('vol-00000000').should be_nil end end describe "#new" do it "should return a Fog::AWS::EC2::Snapshot" do ec2.snapshots.new.should be_a(Fog::AWS::EC2::Snapshot) end end describe "#reload" do it "should return a Fog::AWS::EC2::Snapshots" do ec2.snapshots.all.reload.should be_a(Fog::AWS::EC2::Snapshots) end end end
Version data entries
4 entries across 4 versions & 1 rubygems