0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 09:06:21 +01:00
mongodb/jstests/basic7.js
2009-01-31 17:22:22 -05:00

12 lines
195 B
JavaScript

t = db.basic7;
t.drop();
t.save( { a : 1 } )
t.ensureIndex( { a : 1 } );
assert.eq( t.find().toArray()[0].a , 1 );
assert.eq( t.find().arrayAccess(0).a , 1 );
assert.eq( t.find()[0].a , 1 );