no-data test passing

This commit is contained in:
bmc 2010-10-29 21:16:05 -04:00
parent 8108736b21
commit e57e1809a3

View File

@ -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));
});