mongo/jstests/core/ddl/db.js

15 lines
375 B
JavaScript

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