summaryrefslogtreecommitdiff
path: root/jstests/core/eval8.js
blob: 072a890e80a386ec2902ada3f9373a19fd6df7c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

t = db.eval8;
t.drop();

x = { a : 1 , b : 2 };
t.save( x );
x = t.findOne();

assert( x.a && x.b , "A" );
delete x.b;

assert( x.a && ! x.b , "B" )
x.b = 3;
assert( x.a && x.b , "C" );
assert.eq( 3 , x.b , "D" );

t.save( x );
y = t.findOne();
assert.eq( tojson( x ) , tojson( y ) , "E" );