Browse files

make test use explicit ref MINOR

  • Loading branch information...
1 parent a96c971 commit 6b38f5ec17ac6eafd62893ee6d94597efd74bbee @erh erh committed Jul 6, 2009
Showing with 3 additions and 5 deletions.
  1. +3 −5 jstests/ref.js
View
8 jstests/ref.js
@@ -9,13 +9,11 @@ db.otherthings.save(other);
db.things.save( { name : "abc" } );
x = db.things.findOne();
-x.o = other;
+x.o = new DBRef( "otherthings" , other._id );
db.things.save(x);
-assert( db.things.findOne().o.n == 1, "dbref broken 2" );
+assert( db.things.findOne().o.fetch().n == 1, "dbref broken 2" );
other.n++;
db.otherthings.save(other);
-//print( tojson( db.things.findOne() ) );
-print("ref.js: needs line uncommented after fixing bug:");
-//assert( db.things.findOne().o.n == 2, "dbrefs broken" );
+assert( db.things.findOne().o.fetch().n == 2, "dbrefs broken" );

0 comments on commit 6b38f5e

Please sign in to comment.