summaryrefslogtreecommitdiff
path: root/jstests/index3.js
blob: 80139460cb4358e2b74a7f30e2c80a662ae4b997 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16


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);