node-postgres/test/unit/client/notification-tests.js

10 lines
278 B
JavaScript
Raw Normal View History

2011-03-04 12:55:06 +08:00
var helper = require(__dirname + "/test-helper");
test('passes connection notification', function() {
var client = new Client();
2011-03-04 13:20:47 +08:00
assert.emits(client, 'notification', function(msg) {
2011-03-04 12:55:06 +08:00
assert.equal(msg, "HAY!!");
})
2011-03-04 13:20:47 +08:00
client.connection.emit('notification', "HAY!!");
2011-03-04 12:55:06 +08:00
})