diff options
author | Jeremy Mikola <jmikola@gmail.com> | 2012-07-02 11:48:50 -0400 |
---|---|---|
committer | Jeremy Mikola <jmikola@gmail.com> | 2012-07-02 11:48:50 -0400 |
commit | a66c6f418b40d25702d2a4f4c2064559e04666df (patch) | |
tree | d68b428d73f53fcba3a075a649a45e89dd258b1c /jstests | |
parent | 7f47f022739847e211dc8e054098ed8ee7c753c8 (diff) | |
download | mongo-a66c6f418b40d25702d2a4f4c2064559e04666df.tar.gz |
SERVER-3483 JS test for Timestamp JSON wrapper
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/json1.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/jstests/json1.js b/jstests/json1.js index e045df732bc..8fa03eb7b85 100644 --- a/jstests/json1.js +++ b/jstests/json1.js @@ -18,3 +18,7 @@ assert.eq(tojson(x), '{\n\t"x" : [\n\t\t{\n\t\t\t"x" : [\n\t\t\t\t1,\n\t\t\t\t2, // special types x = {"x" : ObjectId("4ad35a73d2e34eb4fc43579a"), 'z' : /xd?/ig}; assert.eq(tojson(x,"",false), '{\n\t"x" : ObjectId("4ad35a73d2e34eb4fc43579a"),\n\t"z" : /xd?/gi\n}' , "F" ); + +// Timestamp type +x = {"x" : Timestamp()}; +assert.eq(tojson(x,"",false), '{\n\t"x" : Timestamp(0, 0)\n}' , "G") |