summaryrefslogtreecommitdiff
path: root/jstests/core/insert_id_undefined.js
blob: 6d0bc38f8fb45f0b79f3d7aa53435b845247616e (plain)
1
2
3
4
5
6
7
8
9
10
11
// Cannot implicitly shard accessed collections because of collection existing when none
// expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop, requires_fastcount]

// ensure a document with _id undefined cannot be saved
t = db.insert_id_undefined;
t.drop();
t.insert({_id: undefined});
assert.eq(t.count(), 0);
// Make sure the collection was not created
assert.isnull(t.exists());