Sha256: 7169c4726a85814528fc0d0f4a87f7b26e75f14571f80bace0c5f2757e9cdc45
Contents?: true
Size: 1.05 KB
Versions: 16
Compression:
Stored size: 1.05 KB
Contents
require File.dirname(__FILE__) + '/../../../spec_helper' describe 'Storage.delete_bucket' do describe 'success' do before(:each) do Google[:storage].put_bucket('fogdeletebucket') end it 'should return proper attributes' do actual = Google[:storage].delete_bucket('fogdeletebucket') 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_bucket('fognotabucket') }.should raise_error(Excon::Errors::NotFound) end it 'should raise a Conflict error if the bucket is not empty' do Google[:storage].put_bucket('fogdeletebucket') Google[:storage].put_object('fogdeletebucket', 'fog_delete_object', lorem_file) lambda { Google[:storage].delete_bucket('fogdeletebucket') }.should raise_error(Excon::Errors::Conflict) Google[:storage].delete_object('fogdeletebucket', 'fog_delete_object') Google[:storage].delete_bucket('fogdeletebucket') end end end
Version data entries
16 entries across 16 versions & 1 rubygems