Commit 1e00c4dea6fb32b3435643ffc0e8ccf9d8e3f99a
- Diff rendering mode:
- inline
- side by side
spec/database_spec.rb
(1 / 1)
|   | |||
| 163 | 163 | it "should bulk load an array of documents" do | |
| 164 | 164 | db = CouchObject::Database.new(@uri, "foo") | |
| 165 | 165 | resp = Struct.new(:body).new | |
| 166 | resp.body = { "ok" => "true", "results" => [{"ok" => "true", "_id" => "1"}, {"ok" => "true", "_id" => "1"}] }.to_json | ||
| 166 | resp.body = { "ok" => "true", "new_revs" => [{"ok" => "true", "_id" => "1"}, {"ok" => "true", "_id" => "1"}] }.to_json | ||
| 167 | 167 | db.should_receive(:post).with("_bulk_docs", JSON.unparse({ | |
| 168 | 168 | "docs" => [{"foo" => "bar"}, {"foo" => "baz"}] | |
| 169 | 169 | })).and_return(resp) |

