Skip to content

Commit 01161c2

Browse files
author
bmc
committed
todo note about possibly handling commandComplete message tags
1 parent cafded9 commit 01161c2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/unit/client/simple-query-tests.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,20 @@ test('executing query', function() {
9393
});
9494
var handledAgain = con.emit('dataRow', { fields: ["bye"] });
9595
assert.ok(handledAgain, "should have handled seciond data row message");
96+
});
9697

98+
//multiple command complete messages will be sent
99+
//when multiple queries are in a simple command
100+
test('handles command complete messages', function() {
101+
con.emit('commandComplete', {
102+
text: 'INSERT 31 1'
103+
});
97104
});
98105

99106
test('removes itself after another readyForQuery message', function() {
100-
assert.raises(query, "end");
107+
assert.raises(query, "end", function(msg) {
108+
//TODO do we want to check the complete messages?
109+
});
101110
con.emit("readyForQuery");
102111
//this would never actually happen
103112
['dataRow','rowDescritpion', 'commandComplete'].forEach(function(msg) {

0 commit comments

Comments
 (0)