2SN4H8L0IfirQ4QgNw3s5Y changeset

Changeset636635343539 (b)
ParentNone (a)
ab
0+bulkdocs_bug: function (debug) {
0+    var db = new CouchDB("test_suite_bulkdocs");
0+    db.deleteDb();
0+    db.createDb();
0+    if(debug) debugger;
0+     
0+    var docs = [{"_id":1,"client":1,"talents":{"actor":5,"extra":5}},{"_id":2,"client":2,"talents":{"actor":5,"extra":5}}]
0+
0+    // Create the docs
0+    var result = db.bulkSave(docs);
0+
0+    // Should not be ok - non string _id values
0+    T(!result.ok);
0+    T(result.new_revs.length == 0);
0+   
0+    // DB should be empty
0+    var results = db.allDocs();
0+    T(results.rows.length == 0);
0+   
0+    // Try and fetch one
0+    T(db.open(1) == null);
0+  },
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- Revision None
+++ Revision 636635343539
@@ -0,0 +1,22 @@
+bulkdocs_bug: function (debug) {
+ var db = new CouchDB("test_suite_bulkdocs");
+ db.deleteDb();
+ db.createDb();
+ if(debug) debugger;
+
+ var docs = [{"_id":1,"client":1,"talents":{"actor":5,"extra":5}},{"_id":2,"client":2,"talents":{"actor":5,"extra":5}}]
+
+ // Create the docs
+ var result = db.bulkSave(docs);
+
+ // Should not be ok - non string _id values
+ T(!result.ok);
+ T(result.new_revs.length == 0);
+
+ // DB should be empty
+ var results = db.allDocs();
+ T(results.rows.length == 0);
+
+ // Try and fetch one
+ T(db.open(1) == null);
+ },