summaryrefslogtreecommitdiff
path: root/jstests/tool
diff options
context:
space:
mode:
authormike o'brien <mpobrien005@gmail.com>2014-10-01 16:26:18 -0400
committerBenety Goh <benety@mongodb.com>2014-10-01 20:58:28 -0400
commit904f6c7ea8bb01b3fbdd87c88c9b8f18bf2490d7 (patch)
tree0cb2d2245fa7ed5fefc9c96f38e090f8bb90b35d /jstests/tool
parentb1c3d803d97c455c00ffb034296128434f5c7616 (diff)
downloadmongo-904f6c7ea8bb01b3fbdd87c88c9b8f18bf2490d7.tar.gz
SERVER-15397 use doc equality test instead of string equality to test csv import
Closes #803 Signed-off-by: Benety Goh <benety@mongodb.com>
Diffstat (limited to 'jstests/tool')
-rw-r--r--jstests/tool/csvimport1.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/tool/csvimport1.js b/jstests/tool/csvimport1.js
index 3bff1110cbe..f518e31e29b 100644
--- a/jstests/tool/csvimport1.js
+++ b/jstests/tool/csvimport1.js
@@ -20,7 +20,7 @@ assert.soon( base.length + " == c.count()" , "after import 1 " );
a = c.find().sort( { a : 1 } ).toArray();
for (i = 0; i < base.length; i++ ) {
delete a[i]._id
- assert.eq( tojson(base[i]), tojson(a[i]), "csv parse " + i)
+ assert.docEq( base[i], a[i], "csv parse " + i)
}
c.drop()
@@ -33,7 +33,7 @@ assert.eq( base.length - 1 , c.count() , "after import 2" );
x = c.find().sort( { a : 1 } ).toArray();
for (i = 0; i < base.length - 1; i++ ) {
delete x[i]._id
- assert.eq( tojson(base[i]), tojson(x[i]), "csv parse with headerline " + i)
+ assert.docEq( base[i], x[i], "csv parse with headerline " + i)
}