Sha256: 109b12c7ec942c13dc73821ef1d5d87ad83dfb08d37b4312ff27a5f58a871d24
Contents?: true
Size: 1.12 KB
Versions: 14
Compression:
Stored size: 1.12 KB
Contents
require File.dirname(__FILE__) + '/../../../spec_helper' describe 'Rackspace::Storage.delete_object' do describe 'success' do before(:each) do Rackspace[:storage].put_container('container_name') Rackspace[:storage].put_object('container_name', 'object_name', lorem_file) end after(:each) do Rackspace[:storage].delete_container('container_name') end it "should return proper attributes" do Rackspace[:storage].delete_object('container_name', 'object_name') end end describe 'failure' do it "should raise a NotFound error if the container does not exist" do lambda do Rackspace[:storage].delete_object('container_name', 'object_name') end.should raise_error(Fog::Rackspace::Storage::NotFound) end it "should raise a NotFound error if the object does not exist" do Rackspace[:storage].put_container('container_name') lambda do Rackspace[:storage].delete_object('container_name', 'object_name') end.should raise_error(Fog::Rackspace::Storage::NotFound) Rackspace[:storage].delete_container('container_name') end end end
Version data entries
14 entries across 14 versions & 1 rubygems