diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-08-26 00:16:16 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-08-26 00:16:16 -0400 |
commit | fa7fd75fc747087d67aff85afd20a5ee1348a022 (patch) | |
tree | bec15f40ff20894a4eb8fcfb2597a0fd714a9622 /jstests/set1.js | |
parent | 99b20a0b6b99c9070afe533a65dc1ec3cba4eea9 (diff) | |
download | mongo-fa7fd75fc747087d67aff85afd20a5ee1348a022.tar.gz |
broken test for SERVER-261
Diffstat (limited to 'jstests/set1.js')
-rw-r--r-- | jstests/set1.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/jstests/set1.js b/jstests/set1.js new file mode 100644 index 00000000000..f1dc64328ed --- /dev/null +++ b/jstests/set1.js @@ -0,0 +1,16 @@ + +t = db.set1; +t.drop(); + +t.insert( { _id : 1, emb : {} }); + +t.update( { _id : 1 }, { $set : { emb : { 'a.dot' : 'data'} }}); +assert.eq( 1 , t.findOne().emb.keySet().length , "A" ); +assert.eq( "a.dot" , t.findOne().emb.keySet()[0] , "B" ); + +t.update( { _id : 1 }, { $set : { 'emb.b' : { dot : 'data'} }}); +assert.eq( 2 , t.findOne().emb.keySet().length , "C" ); +//assert.eq( "a.dot" , t.findOne().emb.keySet()[0] , "D" ); +//assert.eq( "b" , t.findOne().emb.keySet()[0] , "E" ); + + |