0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00
mongodb/jstests/core/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();