mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 17:10:48 +01:00
more tests for SERVER-181
This commit is contained in:
parent
0a71e870ce
commit
95137f262c
@ -30,5 +30,21 @@ orig.comments[0].rate_up++;
|
||||
orig.comments[0].rate_ups.push( 99 )
|
||||
assert.eq( orig , t.findOne() , "B1" )
|
||||
|
||||
t.drop();
|
||||
orig = { _id : 1 , a : [] }
|
||||
for ( i=0; i<12; i++ )
|
||||
orig.a.push( i );
|
||||
|
||||
|
||||
t.save( orig );
|
||||
assert.eq( orig , t.findOne() , "C1" );
|
||||
|
||||
t.update( {} , { $inc: { "a.0" : 1 } } );
|
||||
orig.a[0]++;
|
||||
assert.eq( orig , t.findOne() , "C2" );
|
||||
|
||||
t.update( {} , { $inc: { "a.10" : 1 } } );
|
||||
orig.a[10]++;
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user