summaryrefslogtreecommitdiff
path: root/jstests/dbcase.js
blob: bf0c8e622fac233bc7728a049c7d18b3ea67f1f3 (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( "test_dbnamea" )
b = db.getSisterDB( "test_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() )