mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
no-data test passing
This commit is contained in:
parent
8108736b21
commit
e57e1809a3
@ -1,7 +1,7 @@
|
||||
var helper = require(__dirname + '/test-helper');
|
||||
|
||||
test("noData message handling", function() {
|
||||
return false;
|
||||
|
||||
var client = helper.client();
|
||||
|
||||
client.query({
|
||||
@ -19,22 +19,17 @@ test("noData message handling", function() {
|
||||
name: 'insert',
|
||||
values: [101]
|
||||
});
|
||||
|
||||
client.connection.on('message', console.log);
|
||||
|
||||
var x = client.query({
|
||||
name: 'fetch',
|
||||
text: 'select size from boom'
|
||||
});
|
||||
|
||||
assert.raises(x, 'row', function(row) {
|
||||
assert.equal(row.fields[0], 100);
|
||||
|
||||
assert.raises(x, 'row', function(row) {
|
||||
assert.equal(row.fields[0], 101);
|
||||
});
|
||||
});
|
||||
|
||||
x.on('end', query.end());
|
||||
var query = client.query({
|
||||
name: 'fetch',
|
||||
text: 'select size from boom where size < $1',
|
||||
values: [101]
|
||||
});
|
||||
|
||||
assert.raises(query, 'row', function(row) {
|
||||
assert.strictEqual(row.fields[0],100)
|
||||
});
|
||||
|
||||
client.on('drain', client.end.bind(client));
|
||||
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user