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/put_attributes_spec.rb
2009-05-18 23:06:49 -07:00

27 lines
876 B
Ruby

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