summaryrefslogtreecommitdiff
path: root/jstests/dbcase.js
blob: d76b739285f4c2c6f70a6ffb900a3abe3ec298ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

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