diff options
author | Aaron <aaron@10gen.com> | 2009-01-28 09:58:54 -0500 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-01-28 09:58:54 -0500 |
commit | 19208c3ae1c319352c83df283f66e5d6d840a558 (patch) | |
tree | 3de363617a694b54884909c70e68b7786d0422ae /jstests | |
parent | 0222a3cae80b09a324159d2b27eea66b3d67d52a (diff) | |
download | mongo-19208c3ae1c319352c83df283f66e5d6d840a558.tar.gz |
Check that index is cleared
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/update2.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/jstests/update2.js b/jstests/update2.js index 726489d64d8..fec76eed427 100644 --- a/jstests/update2.js +++ b/jstests/update2.js @@ -11,3 +11,9 @@ f.save( { a: 4 } ); f.ensureIndex( { a: 1 } ); f.update( { a: 4 }, { $inc: { a: 2 } } ); assert.eq( 4, f.findOne().a ); + +// Verify that drop clears the index +f.drop(); +f.save( { a: 4 } ); +f.update( { a: 4 }, { $inc: { a: 2 } } ); +assert.eq( 6, f.findOne().a );
\ No newline at end of file |