summaryrefslogtreecommitdiff
path: root/jstests/insert1.js
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-03-01 23:16:36 -0500
committerEliot Horowitz <eliot@10gen.com>2010-03-01 23:16:36 -0500
commit677c053850393f8ee670e4bf68cce41f49305cde (patch)
tree9d572ae3451ad659ee3f6b80a2dbfa5aa7fc6bd4 /jstests/insert1.js
parent18b5ef501336e51cfb7a22b1c2a7059c314b29ad (diff)
downloadmongo-677c053850393f8ee670e4bf68cce41f49305cde.tar.gz
fix v8 and change lastID thing a bit
Diffstat (limited to 'jstests/insert1.js')
-rw-r--r--jstests/insert1.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/insert1.js b/jstests/insert1.js
index 834fed56a1e..76edca1d593 100644
--- a/jstests/insert1.js
+++ b/jstests/insert1.js
@@ -3,7 +3,7 @@ t.drop();
o = {a:1};
t.insert(o);
-id = t.lastID
+id = t._lastID
assert.eq(o, {a:1}, "input unchanged 1");
assert.eq(typeof(id), "object", "1");
assert.eq(id.constructor, ObjectId, "1");
@@ -13,7 +13,7 @@ assert.eq(t.findOne({a:1})._id, id , "find by val 1");
o = {a:2, _id:new ObjectId()};
id1 = o._id
t.insert(o);
-id2 = t.lastID
+id2 = t._lastID
assert.eq(id1, id2, "ids match 2");
assert.eq(o, {a:2, _id:id1}, "input unchanged 2");
assert.eq(typeof(id2), "object", "2");
@@ -24,7 +24,7 @@ assert.eq(t.findOne({a:2})._id, id1 , "find by val 2");
o = {a:3, _id:"asdf"};
id1 = o._id
t.insert(o);
-id2 = t.lastID
+id2 = t._lastID
assert.eq(id1, id2, "ids match 3");
assert.eq(o, {a:3, _id:id1}, "input unchanged 3");
assert.eq(typeof(id2), "string", "3");
@@ -34,7 +34,7 @@ assert.eq(t.findOne({a:3})._id, id1 , "find by val 3");
o = {a:4, _id:null};
id1 = o._id
t.insert(o);
-id2 = t.lastID
+id2 = t._lastID
assert.eq(id1, id2, "ids match 4");
assert.eq(o, {a:4, _id:id1}, "input unchanged 4");
assert.eq(t.findOne({_id:id1}).a, 4, "find by id 4");