summaryrefslogtreecommitdiff
path: root/jstests/core/find_and_modify3.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/find_and_modify3.js')
-rw-r--r--jstests/core/find_and_modify3.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/jstests/core/find_and_modify3.js b/jstests/core/find_and_modify3.js
index 3f8fc22d98d..a319aef7a2d 100644
--- a/jstests/core/find_and_modify3.js
+++ b/jstests/core/find_and_modify3.js
@@ -19,7 +19,8 @@ orig2 = t.findOne({_id: 2});
out = t.findAndModify({
query: {_id: 1, 'comments.i': 0},
- update: {$set: {'comments.$.j': 2}}, 'new': true,
+ update: {$set: {'comments.$.j': 2}},
+ 'new': true,
sort: {other: 1}
});
assert.eq(out.comments[0], {i: 0, j: 2});
@@ -29,7 +30,8 @@ assert.eq(t.findOne({_id: 2}), orig2);
out = t.findAndModify({
query: {other: 1, 'comments.i': 1},
- update: {$set: {'comments.$.j': 3}}, 'new': true,
+ update: {$set: {'comments.$.j': 3}},
+ 'new': true,
sort: {other: 1}
});
assert.eq(out.comments[0], {i: 0, j: 2});