Sha256: da31f2c70c92bca82837606d69a78b9ec92c5b338dea4258ea1d55531a1f8832
Contents?: true
Size: 1.11 KB
Versions: 16
Compression:
Stored size: 1.11 KB
Contents
require File.dirname(__FILE__) + '/../../../spec_helper' describe 'Storage.delete_object' do describe 'success' do before(:each) do Google[:storage].put_bucket('fogdeleteobject') Google[:storage].put_object('fogdeleteobject', 'fog_delete_object', lorem_file) end after(:each) do Google[:storage].delete_bucket('fogdeleteobject') end it 'should return proper attributes' do actual = Google[:storage].delete_object('fogdeleteobject', 'fog_delete_object') actual.status.should == 204 end end describe 'failure' do it 'should raise a NotFound error if the bucket does not exist' do lambda { Google[:storage].delete_object('fognotabucket', 'fog_delete_object') }.should raise_error(Excon::Errors::NotFound) end it 'should raise an error if the object does not exist' do Google[:storage].put_bucket('fogdeleteobject') lambda { Google[:storage].delete_object('fogdeleteobject', 'fog_not_an_object') }.should raise_error(Excon::Errors::NotFound) Google[:storage].delete_bucket('fogdeleteobject') end end end
Version data entries
16 entries across 16 versions & 1 rubygems