Files
mongo/jstests/core/index3.js
Randolph Tan 5595b94560 SERVER-12127 migrate js tests to jscore suite when not related to writes
Moved test jstest/[a-i].js -> jstests/core/ and made changes to comply with write command api
2014-02-28 16:26:33 -05:00

17 lines
225 B
JavaScript

t = db.index3;
t.drop();
assert( t.getIndexes().length == 0 );
t.ensureIndex( { name : 1 } );
t.save( { name : "a" } );
t.ensureIndex( { name : 1 } );
assert( t.getIndexes().length == 2 );
assert(t.validate().valid);