diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-05-14 16:39:36 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-05-14 16:39:36 -0400 |
commit | a1da020445c9235f2b5eadf04300942cb54af3a5 (patch) | |
tree | e517df1e122796fe27ad2eed3da9846a13072504 /jstests/update3.js | |
parent | c6eaf9c5003f6e7a40bf622bb9e158d7a91285e4 (diff) | |
download | mongo-a1da020445c9235f2b5eadf04300942cb54af3a5.tar.gz |
better asserts
Diffstat (limited to 'jstests/update3.js')
-rw-r--r-- | jstests/update3.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/update3.js b/jstests/update3.js index 26a21669659..4dfeb900a10 100644 --- a/jstests/update3.js +++ b/jstests/update3.js @@ -5,19 +5,19 @@ f = db.jstests_update3; f.drop(); f.save( { a:1 } ); f.update( {}, {$inc:{ a:1 }} ); -assert.eq( 2, f.findOne().a ); +assert.eq( 2, f.findOne().a , "A" ); f.drop(); f.save( { a:{ b: 1 } } ); f.update( {}, {$inc:{ "a.b":1 }} ); -assert.eq( 2, f.findOne().a.b ); +assert.eq( 2, f.findOne().a.b , "B" ); f.drop(); f.save( { a:{ b: 1 } } ); f.update( {}, {$set:{ "a.b":5 }} ); -assert.eq( 5, f.findOne().a.b ); +assert.eq( 5, f.findOne().a.b , "C" ); f.drop(); f.save( {'_id':0} ); f.update( {}, {$set:{'_id':5}} ); -assert.eq( 0, f.findOne()._id );
\ No newline at end of file +assert.eq( 0, f.findOne()._id , "D" ); |