2009-10-11 13:37:25 -07:00
|
|
|
require File.dirname(__FILE__) + '/../../../spec_helper'
|
|
|
|
|
|
|
|
describe 'Rackspace::Files.get_containers' 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
|
|
|
|
|
|
|
|
after(:each) do
|
2010-01-23 12:35:16 -08:00
|
|
|
Rackspace[:files].delete_container('container_name')
|
2009-11-05 00:02:26 -08:00
|
|
|
end
|
|
|
|
|
2009-10-11 13:37:25 -07:00
|
|
|
it "should return proper attributes" do
|
2010-01-23 12:35:16 -08:00
|
|
|
actual = Rackspace[:files].get_containers.body
|
2009-11-05 00:02:26 -08:00
|
|
|
actual.first['bytes'].should be_an(Integer)
|
|
|
|
actual.first['count'].should be_an(Integer)
|
|
|
|
actual.first['name'].should be_a(String)
|
2009-10-11 13:37:25 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|