notification message

This commit is contained in:
brianc 2011-03-03 23:20:47 -06:00
parent 16aa5ae981
commit 749531f597
2 changed files with 4 additions and 4 deletions

View File

@ -23,8 +23,8 @@ var Client = function(config) {
this.password = config.password || defaults.password;
this.encoding = 'utf8';
var self = this;
this.connection.on('notify', function(msg) {
self.emit('notify', msg);
this.connection.on('notification', function(msg) {
self.emit('notification', msg);
})
};

View File

@ -1,9 +1,9 @@
var helper = require(__dirname + "/test-helper");
test('passes connection notification', function() {
var client = new Client();
assert.emits(client, 'notify', function(msg) {
assert.emits(client, 'notification', function(msg) {
assert.equal(msg, "HAY!!");
})
client.connection.emit('notify', "HAY!!");
client.connection.emit('notification', "HAY!!");
})