renamed 'notificationResponse' to 'notification' for consistency

This commit is contained in:
brianc 2010-10-24 14:45:07 -05:00
parent ee4a65b923
commit ec4078d508
4 changed files with 5 additions and 4 deletions

View File

@ -189,7 +189,7 @@ var messageNames = {
N: 'notice',
1: 'parseComplete',
2: 'bindComplete',
A: 'notificationResponse'
A: 'notification'
};
p.parseMessage = function() {

View File

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

View File

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

View File

@ -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'