Commit b38ea434c219dcaa5b826f22d5047ca4f3d3fff0
- Date: Sat Jun 14 01:50:08 +0000 2008
- Committer: Tim Dysinger (tim@dysinger.net)
- Author: Tim Dysinger (tim@dysinger.net)
- Commit SHA1: b38ea434c219dcaa5b826f22d5047ca4f3d3fff0
- Tree SHA1: 40d6b60102a3124284034d6d67bd05ff115fa15e
corrected db integration specs for couch 0.8.0-incubator trunk
Commit diff
| |   |
| 69 | 69 | created_doc = response.to_document |
| 70 | 70 | |
| 71 | 71 | resp = db.delete(created_doc.id, created_doc.revision) |
| 72 | | resp.code.should == 202 |
| 72 | resp.code.should == 200 |
| 73 | 73 | |
| 74 | 74 | resp = db.get(created_doc.id) |
| 75 | 75 | resp.code.should == 404 |
| … | … | |
| 95 | 95 | db.store(doc2) |
| 96 | 96 | res = db.query(:map => "function(doc){ emit(null, doc.data) }", |
| 97 | 97 | :reduce => "function(key, values){ return sum(values) }") |
| 98 | p res |
| 98 | 99 | res.should be_instance_of CouchObject::Document |
| 99 | | res.result.should == 4 |
| 100 | res.rows[0]['value'].should == 4 |
| 100 | 101 | end |
| 101 | 102 | |
| 102 | 103 | end |
| toggle raw diff |
--- a/spec/integration/database_integration_spec.rb
+++ b/spec/integration/database_integration_spec.rb
@@ -69,7 +69,7 @@ describe "Database operations" do
created_doc = response.to_document
resp = db.delete(created_doc.id, created_doc.revision)
- resp.code.should == 202
+ resp.code.should == 200
resp = db.get(created_doc.id)
resp.code.should == 404
@@ -95,8 +95,9 @@ describe "Database operations" do
db.store(doc2)
res = db.query(:map => "function(doc){ emit(null, doc.data) }",
:reduce => "function(key, values){ return sum(values) }")
+ p res
res.should be_instance_of CouchObject::Document
- res.result.should == 4
+ res.rows[0]['value'].should == 4
end
end |