~ubuntu-branches/ubuntu/trusty/mongodb/trusty-proposed

« back to all changes in this revision

Viewing changes to jstests/autoid.js

  • Committer: Bazaar Package Importer
  • Author(s): Antonin Kral
  • Date: 2010-01-29 19:48:45 UTC
  • Revision ID: james.westby@ubuntu.com-20100129194845-8wbmkf626fwcavc9
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
f = db.jstests_autoid;
 
2
f.drop();
 
3
 
 
4
f.save( {z:1} );
 
5
a = f.findOne( {z:1} );
 
6
f.update( {z:1}, {z:2} );
 
7
b = f.findOne( {z:2} );
 
8
assert.eq( a._id.str, b._id.str );
 
9
c = f.update( {z:2}, {z:"abcdefgabcdefgabcdefg"} );
 
10
c = f.findOne( {} );
 
11
assert.eq( a._id.str, c._id.str );