mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 01:21:03 +01:00
21 lines
338 B
JavaScript
21 lines
338 B
JavaScript
|
|
|
|
|
|
|
|
a = db.getSisterDB( "copydb-test-a" );
|
|
b = db.getSisterDB( "copydb-test-b" );
|
|
|
|
a.dropDatabase();
|
|
b.dropDatabase();
|
|
|
|
a.foo.save( { a : 1 } );
|
|
|
|
assert.eq( 1 , a.foo.count() , "A" );
|
|
assert.eq( 0 , b.foo.count() , "B" );
|
|
|
|
a.copyDatabase( a._name , b._name );
|
|
|
|
assert.eq( 1 , a.foo.count() , "C" );
|
|
assert.eq( 1 , b.foo.count() , "D" );
|
|
|