diff options
Diffstat (limited to 'jstests/core/update_arraymatch7.js')
-rw-r--r-- | jstests/core/update_arraymatch7.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/core/update_arraymatch7.js b/jstests/core/update_arraymatch7.js index 5621f60c39e..4c0302dbfec 100644 --- a/jstests/core/update_arraymatch7.js +++ b/jstests/core/update_arraymatch7.js @@ -6,14 +6,14 @@ t.drop(); function testPositionalInc() { t.remove({}); - t.save( { a:[ { b:'match', count:0 } ] } ); - t.update( { 'a.b':'match' }, { $inc:{ 'a.$.count':1 } } ); + t.save({a: [{b: 'match', count: 0}]}); + t.update({'a.b': 'match'}, {$inc: {'a.$.count': 1}}); // Check that the positional $inc succeeded. - assert( t.findOne( { 'a.count':1 } ) ); + assert(t.findOne({'a.count': 1})); } testPositionalInc(); // Now check with a non multikey index. -t.ensureIndex( { 'a.b' : 1 } ); +t.ensureIndex({'a.b': 1}); testPositionalInc(); |