Files
mongo/jstests/db.js
Tad Marshall b6bfcd495a SERVER-6729 adapt test to changed database naming rules
We now allow * and ? in database names on Linux, so we can't
use them to test our testing.
2012-08-07 16:15:47 -04:00

12 lines
360 B
JavaScript

function testInvalidDBNameThrowsExceptionWithConstructor() {
assert.throws( function() { return new DB( null, "/\\" ); } );
}
function testInvalidDBNameThrowsExceptionWithSibling() {
assert.throws( function() { return db.getSiblingDB( "/\\" ); } );
}
testInvalidDBNameThrowsExceptionWithConstructor();
testInvalidDBNameThrowsExceptionWithSibling();