2009-11-01 23:34:00 -08:00
|
|
|
require File.dirname(__FILE__) + '/../../../spec_helper'
|
|
|
|
|
|
|
|
describe 'Rackspace::Files.delete_container' do
|
|
|
|
describe 'success' do
|
|
|
|
|
2009-11-05 00:02:26 -08:00
|
|
|
before(:each) do
|
2010-01-23 12:35:16 -08:00
|
|
|
Rackspace[:files].put_container('container_name')
|
2009-11-05 00:02:26 -08:00
|
|
|
end
|
|
|
|
|
2009-11-01 23:34:00 -08:00
|
|
|
it "should return proper attributes" do
|
2010-01-23 12:35:16 -08:00
|
|
|
Rackspace[:files].delete_container('container_name')
|
2009-11-01 23:34:00 -08:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
2009-11-06 21:22:38 -08:00
|
|
|
describe 'failure' do
|
|
|
|
|
|
|
|
it "should raise a NotFound error if the container does not exist" do
|
|
|
|
lambda do
|
2010-01-23 12:35:16 -08:00
|
|
|
Rackspace[:files].delete_container('container_name')
|
2009-11-06 21:22:38 -08:00
|
|
|
end.should raise_error(Excon::Errors::NotFound)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
2009-11-01 23:34:00 -08:00
|
|
|
end
|