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