summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/update_post_image_validation.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthrough/update_post_image_validation.js')
-rw-r--r--jstests/noPassthrough/update_post_image_validation.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/noPassthrough/update_post_image_validation.js b/jstests/noPassthrough/update_post_image_validation.js
index ba2e6ecf6ab..228d449f828 100644
--- a/jstests/noPassthrough/update_post_image_validation.js
+++ b/jstests/noPassthrough/update_post_image_validation.js
@@ -14,13 +14,13 @@ const testDB = conn.getDB("test");
assert.commandWorked(testDB.coll.insert({_id: 0, a: []}));
assert.commandWorked(
testDB.coll.update({_id: 0}, {$set: {"a.1": 0, "a.0": {$ref: "coll", $db: "test"}}}));
-assert.docEq(testDB.coll.findOne({_id: 0}), {_id: 0, a: [{$ref: "coll", $db: "test"}, 0]});
+assert.docEq({_id: 0, a: [{$ref: "coll", $db: "test"}, 0]}, testDB.coll.findOne({_id: 0}));
// Test validation of modified array elements that are accessed using a string that is
// numerically equivalent to their fieldname. The modified element is valid.
assert.commandWorked(testDB.coll.insert({_id: 1, a: [0]}));
assert.commandWorked(testDB.coll.update({_id: 1}, {$set: {"a.00": {$ref: "coll", $db: "test"}}}));
-assert.docEq(testDB.coll.findOne({_id: 1}), {_id: 1, a: [{$ref: "coll", $db: "test"}]});
+assert.docEq({_id: 1, a: [{$ref: "coll", $db: "test"}]}, testDB.coll.findOne({_id: 1}));
MongoRunner.stopMongod(conn);
}());