0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00
mongodb/jstests/dbcase.js
2010-08-23 12:54:02 -04:00

24 lines
443 B
JavaScript

a = db.getSisterDB( "dbcasetest_dbnamea" )
b = db.getSisterDB( "dbcasetest_dbnameA" )
a.dropDatabase();
b.dropDatabase();
a.foo.save( { x : 1 } )
z = db.getLastErrorObj();
assert.eq( 0 , z.code || 0 , "A : " + tojson(z) )
b.foo.save( { x : 1 } )
z = db.getLastErrorObj();
assert.eq( 13297 , z.code || 0 , "B : " + tojson(z) )
print( db.getMongo().getDBNames() )
a.dropDatabase();
b.dropDatabase();
print( db.getMongo().getDBNames() )