2013-08-28 13:25:48 -04:00
|
|
|
// ensure a document with _id undefined cannot be saved
|
|
|
|
|
t = db.insert_id_undefined;
|
|
|
|
|
t.drop();
|
2016-03-09 12:17:50 -05:00
|
|
|
t.insert({_id: undefined});
|
2013-08-28 13:25:48 -04:00
|
|
|
assert.eq(t.count(), 0);
|
2014-03-04 14:24:16 -05:00
|
|
|
// Make sure the collection was not created
|
2016-03-09 12:17:50 -05:00
|
|
|
assert.commandFailed(t.stats());
|