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
2009-07-15 23:37:22 -07:00

34 lines
969 B
Ruby

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
eventually do
actual = sdb.get_attributes('delete_attributes', 'foo')
actual.body[:attributes].should == { 'bar' => ['baz'] }
end
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)
end
it 'should have no attributes for foo after delete_attributes' do
eventually do
actual = sdb.get_attributes('delete_attributes', 'foo')
actual.body[:attributes].should be_empty
end
end
end