summaryrefslogtreecommitdiff
path: root/jstests/pushall.js
diff options
context:
space:
mode:
authorAaron Staple <aaron@10gen.com>2009-07-21 18:37:30 -0400
committerAaron Staple <aaron@10gen.com>2009-07-21 18:37:30 -0400
commitc477ed3a158354c7f31d950bac6b3a373acc5d1d (patch)
tree7b83e493e4e0533fbd71ce93da7e1e6832939321 /jstests/pushall.js
parent9c44b1c8642dde6d5cb3513728bbfcd235ffe03f (diff)
downloadmongo-c477ed3a158354c7f31d950bac6b3a373acc5d1d.tar.gz
bug SERVER-132 implemented pullAll/pushAll modifiers
Diffstat (limited to 'jstests/pushall.js')
-rw-r--r--jstests/pushall.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/jstests/pushall.js b/jstests/pushall.js
index 83fd4a39b65..73e62b56721 100644
--- a/jstests/pushall.js
+++ b/jstests/pushall.js
@@ -4,11 +4,13 @@ t.drop();
t.save( { a: [ 1, 2, 3 ] } );
t.update( {}, { $pushAll: { a: [ 4 ] } } );
assert.eq( [ 1, 2, 3, 4 ], t.findOne().a );
-// t.update( {}, { $pushAll: { a: [ 4 ] } } );
-// assert.eq( [ 1, 2, 3, 4, 4 ], t.findOne().a );
+t.update( {}, { $pushAll: { a: [ 4 ] } } );
+assert.eq( [ 1, 2, 3, 4, 4 ], t.findOne().a );
+
+t.drop();
+t.save( { a: [ 1, 2, 3 ] } );
+t.update( {}, { $pushAll: { a: [ 4, 5 ] } } );
+assert.eq( [ 1, 2, 3, 4, 5 ], t.findOne().a );
+t.update( {}, { $pushAll: { a: [] } } );
+assert.eq( [ 1, 2, 3, 4, 5 ], t.findOne().a );
-// t.drop();
-// t.update( {}, { $pushAll: { a: [ 4, 5 ] } } );
-// assert.eq( [ 1, 2, 3, 4, 5 ], t.findOne().a );
-// t.update( {}, { $pushAll: { a: [] } } );
-// assert.eq( [ 1, 2, 3, 4, 5 ], t.findOne().a );