spec/aws/simpledb_spec.rb in sdbport-0.1.1 vs spec/aws/simpledb_spec.rb in sdbport-0.2.0

- old
+ new

@@ -20,19 +20,10 @@ @body_stub.should_receive(:body). and_return 'Domains' => ['domain1'] @sdb.domains.should == ['domain1'] end - it "should perform select query given" do - @fog_mock.should_receive(:select). - with('select * from name', 'ConsistentRead' => true). - and_return @body_stub - @body_stub.stub :body => 'thegoods' - @sdb.select('select * from name', 'ConsistentRead' => true). - should == 'thegoods' - end - it "should perform select query given and next tokens" do body_stub0 = stub 'body0', :body => { 'Items' => { 'id1' => 'val1' }, 'NextToken' => '1' } @@ -76,11 +67,13 @@ @fog_mock.should_receive(:delete_domain).with('new_domain') @sdb.delete_domain('new_domain') end it "should update the attributes for an item" do - @fog_mock.should_receive(:put_attributes).with('domain', 'key', {'key' => 'value'}, { "option" => "123" }) - @sdb.put_attributes('domain', 'key', {'key' => 'value'}, { "option" => "123" }) + @fog_mock.should_receive(:batch_put_attributes).with('domain', { 'item1' => { 'key1' => 'value1' }, + 'item2' => { 'key2' => 'value2' } }) + @sdb.batch_put_attributes('domain', { 'item1' => { 'key1' => 'value1' }, + 'item2' => { 'key2' => 'value2' } }) end context "testing counts" do it "should count the number of entries in the domain" do data = { 'Items' => { 'Domain' => { 'Count' => ['1'] } } }