1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/spec/aws/simpledb/delete_attributes.rb

29 lines
975 B
Ruby
Raw Normal View History

2009-05-19 02:06:49 -04:00
require File.dirname(__FILE__) + '/../../spec_helper'
describe 'SimpleDB.delete_attributes' do
before(:all) do
sdb.create_domain('delete_attributes')
sdb.put_attributes('delete_attributes', 'foo', { :bar => :baz })
end
after(:all) do
sdb.delete_domain('delete_attributes')
end
it 'should have attributes for foo before delete_attributes' do
lambda { sdb.get_attributes('delete_attributes', 'foo') }.should eventually { |expected| expected.body[:attributes].should == { 'bar' => ['baz'] } }
2009-05-19 02:06:49 -04:00
end
it 'should return proper attributes from delete_attributes' do
actual = sdb.delete_attributes('delete_attributes', 'foo')
actual.body[:request_id].should be_a(String)
actual.body[:box_usage].should be_a(Float)
2009-05-19 02:06:49 -04:00
end
it 'should have no attributes for foo after delete_attributes' do
lambda { sdb.get_attributes('delete_attributes', 'foo') }.should eventually { |expected| expected.body[:attributes].should be_empty }
2009-05-19 02:06:49 -04:00
end
end