summaryrefslogtreecommitdiff
path: root/jstests/aggregation/bugs/server5782.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/aggregation/bugs/server5782.js')
-rw-r--r--jstests/aggregation/bugs/server5782.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/jstests/aggregation/bugs/server5782.js b/jstests/aggregation/bugs/server5782.js
index 47bb7dd8826..f28694e19a8 100644
--- a/jstests/aggregation/bugs/server5782.js
+++ b/jstests/aggregation/bugs/server5782.js
@@ -6,13 +6,15 @@ db.server5782.save({string: "foo"});
// check that without $literal we end up comparing a field with itself and the result is true
var result = db.runCommand({
aggregate: "server5782",
- pipeline: [{$project: {stringis$string: {$eq: ["$string", '$string']}}}]
+ pipeline: [{$project: {stringis$string: {$eq: ["$string", '$string']}}}],
+ cursor: {}
});
-assert.eq(result.result[0].stringis$string, true);
+assert.eq(result.cursor.firstBatch[0].stringis$string, true);
// check that with $literal we end up comparing a field with '$string' and the result is true
var result = db.runCommand({
aggregate: "server5782",
- pipeline: [{$project: {stringis$string: {$eq: ["$string", {$literal: '$string'}]}}}]
+ pipeline: [{$project: {stringis$string: {$eq: ["$string", {$literal: '$string'}]}}}],
+ cursor: {}
});
-assert.eq(result.result[0].stringis$string, false);
+assert.eq(result.cursor.firstBatch[0].stringis$string, false);