Add nested-nested test.

Taken from Glasser's old code-review.
This commit is contained in:
Slava Kim
2013-09-10 02:54:53 -07:00
parent f6e307e644
commit 83136f64aa

View File

@@ -1116,6 +1116,12 @@ Tinytest.add("minimongo - fetch with projection, subarrays", function (test) {
setA: [{fieldB:33}, {fieldB:"the bad",fieldC:"the ugly"}],
setB: [{ anotherB: "meh" }, { anotherB: 431 }]
});
c.remove({});
c.insert({a:[[{b:1,c:2},{b:2,c:4}],{b:3,c:5},[{b:4, c:9}]]});
testForProjection({ 'a.b': 1, _id: 0 },
{"a" : [ [ { "b" : 1 }, { "b" : 2 } ], { "b" : 3 }, [ { "b" : 4 } ] ] });
});
Tinytest.add("minimongo - observe ordered with projection", function (test) {