summaryrefslogtreecommitdiff
path: root/jstests/core/db.js
blob: cc698f483c7dbce5d0c1cf0e2ebc9d487bba23a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function testInvalidDBNameThrowsExceptionWithConstructor() {
    assert.throws(function() {
        return new DB(null, "/\\");
    });
}

function testInvalidDBNameThrowsExceptionWithSibling() {
    assert.throws(function() {
        return db.getSiblingDB("/\\");
    });
}

testInvalidDBNameThrowsExceptionWithConstructor();
testInvalidDBNameThrowsExceptionWithSibling();