summaryrefslogtreecommitdiff
path: root/jstests/aggregation/bugs/server6335.js
blob: a26568280ce1c5bf5c6e281ed1ed9a302dd3b067 (plain)
1
2
3
4
5
6
7
// server-6335: don't allow $where clauses in a $match

// load the test utilities
load('jstests/aggregation/extras/utils.js');

assertErrorCode(db.foo, {$match: {$where: "return true"}}, 16395);
assertErrorCode(db.foo, {$match: {$and: [{$where: "return true"}]}}, 16395);