summaryrefslogtreecommitdiff
path: root/jstests/objid1.js
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-07-06 13:47:00 -0400
committerEliot Horowitz <eliot@10gen.com>2009-07-06 13:47:00 -0400
commita96c97161eaff686449560e4f3f5029d91287656 (patch)
treeea6f44abeebe009ff1476032ed000e65dcc644ba /jstests/objid1.js
parent7bb37b3fd2dfdd3ff3c15634236b4ca487ceda62 (diff)
downloadmongo-a96c97161eaff686449560e4f3f5029d91287656.tar.gz
make objectid serialize to something parseable
Diffstat (limited to 'jstests/objid1.js')
-rw-r--r--jstests/objid1.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/jstests/objid1.js b/jstests/objid1.js
index f0b62ef5d0c..dea31eed0d8 100644
--- a/jstests/objid1.js
+++ b/jstests/objid1.js
@@ -11,3 +11,6 @@ t.save( { a : a } )
assert( t.findOne().a.isObjectId , "C" );
assert.eq( a.str , t.findOne().a.str , "D" );
+x = { a : new ObjectId() };
+eval( " y = " + tojson( x ) );
+assert.eq( x.a.str , y.a.str , "E" );