mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
renamed 'notificationResponse' to 'notification' for consistency
This commit is contained in:
parent
ee4a65b923
commit
ec4078d508
@ -189,7 +189,7 @@ var messageNames = {
|
||||
N: 'notice',
|
||||
1: 'parseComplete',
|
||||
2: 'bindComplete',
|
||||
A: 'notificationResponse'
|
||||
A: 'notification'
|
||||
};
|
||||
|
||||
p.parseMessage = function() {
|
||||
|
||||
@ -5,7 +5,7 @@ test('recieves notification from same connection with no payload', function() {
|
||||
con.query('LISTEN boom');
|
||||
assert.raises(con, 'readyForQuery', function() {
|
||||
con.query("NOTIFY boom");
|
||||
assert.raises(con, 'notificationResponse', function(msg) {
|
||||
assert.raises(con, 'notification', function(msg) {
|
||||
assert.equal(msg.payload, "");
|
||||
assert.equal(msg.channel, 'boom')
|
||||
con.end();
|
||||
|
||||
@ -105,7 +105,7 @@ buffers.bindComplete = function() {
|
||||
return new BufferList().join(true, '2');
|
||||
};
|
||||
|
||||
buffers.notificationResponse = function(id, channel, payload) {
|
||||
buffers.notification = function(id, channel, payload) {
|
||||
return new BufferList()
|
||||
.addInt32(id)
|
||||
.addCString(channel)
|
||||
|
||||
@ -153,9 +153,10 @@ var expectedMD5PasswordMessage = {
|
||||
name: 'authenticationMD5Password'
|
||||
};
|
||||
|
||||
var notificationResponseBuffer = buffers.notificationResponse(4, 'hi', 'boom');
|
||||
var notificationResponseBuffer = buffers.notification(4, 'hi', 'boom');
|
||||
var expectedNotificationResponseMessage = {
|
||||
id: 'A',
|
||||
name: 'notification',
|
||||
processId: 4,
|
||||
channel: 'hi',
|
||||
payload: 'boom'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user