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

make new simpledb tests pass a bit more consistently

This commit is contained in:
geemus 2010-07-13 20:19:26 -07:00
parent 9dd4e9877c
commit fa29473bbb
2 changed files with 8 additions and 4 deletions

View file

@ -22,9 +22,11 @@ describe 'SimpleDB.get_attributes' do
it 'should return multi-value attributes from get_attributes' do it 'should return multi-value attributes from get_attributes' do
AWS[:sdb].put_attributes(@domain_name, 'buzz', { "attr" => "foo" }) AWS[:sdb].put_attributes(@domain_name, 'buzz', { "attr" => "foo" })
AWS[:sdb].put_attributes(@domain_name, 'buzz', { "attr" => "foo2" }) AWS[:sdb].put_attributes(@domain_name, 'buzz', { "attr" => "foo2" })
eventually do
actual = AWS[:sdb].get_attributes(@domain_name, 'buzz') actual = AWS[:sdb].get_attributes(@domain_name, 'buzz')
actual.body["Attributes"]["attr"].should == ['foo', 'foo2'] actual.body["Attributes"]["attr"].should == ['foo', 'foo2']
end end
end
it 'should have attributes for foo after put_attributes' do it 'should have attributes for foo after put_attributes' do
AWS[:sdb].put_attributes(@domain_name, 'foo', { :bar => :baz }) AWS[:sdb].put_attributes(@domain_name, 'foo', { :bar => :baz })

View file

@ -16,9 +16,11 @@ describe 'SimpleDB.select' do
@item = "someitem_fog_domain_#{Time.now.to_i}" @item = "someitem_fog_domain_#{Time.now.to_i}"
AWS[:sdb].put_attributes(@domain_name, @item, { "attr" => "foo" }) AWS[:sdb].put_attributes(@domain_name, @item, { "attr" => "foo" })
AWS[:sdb].put_attributes(@domain_name, @item, { "attr" => "foo2" }) AWS[:sdb].put_attributes(@domain_name, @item, { "attr" => "foo2" })
eventually do
actual = AWS[:sdb].select("select * from #{@domain_name}") actual = AWS[:sdb].select("select * from #{@domain_name}")
actual.body['Items'][@item]["attr"].should == ['foo','foo2'] actual.body['Items'][@item]["attr"].should == ['foo','foo2']
end end
end
end end
end end