summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorJeremy Mikola <jmikola@gmail.com>2012-07-02 11:48:50 -0400
committerJeremy Mikola <jmikola@gmail.com>2012-07-02 11:48:50 -0400
commita66c6f418b40d25702d2a4f4c2064559e04666df (patch)
treed68b428d73f53fcba3a075a649a45e89dd258b1c /jstests
parent7f47f022739847e211dc8e054098ed8ee7c753c8 (diff)
downloadmongo-a66c6f418b40d25702d2a4f4c2064559e04666df.tar.gz
SERVER-3483 JS test for Timestamp JSON wrapper
Diffstat (limited to 'jstests')
-rw-r--r--jstests/json1.js4
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")