Skip to content

Commit 2aba95e

Browse files
committed
tests
1 parent 8a868f4 commit 2aba95e

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

test/integration/client/query-args-tests.js

+2-20
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,11 @@
1-
/*
2-
var helper = require(__dirname+'/test-helper');
3-
var client = helper.client();
4-
5-
test('check that passed values types have not been changed during the query phase', assert.calls(function() {
6-
var originalValues = [1,new Date()];
7-
var values = originalValues.slice();
8-
9-
client.query('SELECT 1 WHERE 0 <> $1 AND 0 <> $2',values, function(err, result) {
10-
assert.isNull(err);
11-
assert.equal(result.rows.length, 1);
12-
console.log('result:',result.rows[0]);
13-
assert.equal(values.length,originalValues.length,'expecting same length as given array!');
14-
assert.strictEqual(isNaN(values[0]),false,'expecting a number!');
15-
assert.strictEqual(values[1] instanceof Date,true,'expecting a Date object!');
16-
})
17-
})); */
18-
191
var helper = require(__dirname + '/test-helper');
202
var pg = helper.pg;
213
var config = helper.config;
224

235
test('check that passed values types have not been changed during the query phase', function() {
246

257
pg.connect(config, assert.success(function(client, done) {
26-
var originalValues = [1,new Date()];
8+
var originalValues = [1,2];
279
var values = originalValues.slice();
2810

2911
client.query('SELECT 1 WHERE 0 <> $1 AND 0 <> $2',values, assert.success(function(err,result) {
@@ -32,7 +14,7 @@ test('check that passed values types have not been changed during the query phas
3214
console.log('result:',result.rows[0]);
3315
assert.equal(values.length,originalValues.length,'expecting same length as given array!');
3416
assert.strictEqual(isNaN(values[0]),false,'expecting a number!');
35-
assert.strictEqual(values[1] instanceof Date,true,'expecting a Date object!');
17+
assert.strictEqual(isNaN(values[1]),false,'expecting a number!');
3618
done();
3719
}));
3820

0 commit comments

Comments
 (0)