diff options
Diffstat (limited to 'jstests/core/find_and_modify2.js')
-rw-r--r-- | jstests/core/find_and_modify2.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/jstests/core/find_and_modify2.js b/jstests/core/find_and_modify2.js index 2c8ab5b3bb6..e9bc8f5b23a 100644 --- a/jstests/core/find_and_modify2.js +++ b/jstests/core/find_and_modify2.js @@ -1,16 +1,16 @@ t = db.find_and_modify2; t.drop(); -t.insert({_id:1, i:0, j:0}); +t.insert({_id: 1, i: 0, j: 0}); -out = t.findAndModify({update: {$inc: {i:1}}, 'new': true, fields: {i:1}}); -assert.eq(out, {_id:1, i:1}); +out = t.findAndModify({update: {$inc: {i: 1}}, 'new': true, fields: {i: 1}}); +assert.eq(out, {_id: 1, i: 1}); -out = t.findAndModify({update: {$inc: {i:1}}, fields: {i:0}}); -assert.eq(out, {_id:1, j:0}); +out = t.findAndModify({update: {$inc: {i: 1}}, fields: {i: 0}}); +assert.eq(out, {_id: 1, j: 0}); -out = t.findAndModify({update: {$inc: {i:1}}, fields: {_id:0, j:1}}); -assert.eq(out, {j:0}); +out = t.findAndModify({update: {$inc: {i: 1}}, fields: {_id: 0, j: 1}}); +assert.eq(out, {j: 0}); -out = t.findAndModify({update: {$inc: {i:1}}, fields: {_id:0, j:1}, 'new': true}); -assert.eq(out, {j:0}); +out = t.findAndModify({update: {$inc: {i: 1}}, fields: {_id: 0, j: 1}, 'new': true}); +assert.eq(out, {j: 0}); |