From 470b0a2c4f4afc65f8730fb1d8912daa077eeca0 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Tue, 8 Mar 2016 18:01:56 +0200 Subject: [PATCH] Fix test --- test/plugins/link.js | 2 +- test/util.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/plugins/link.js b/test/plugins/link.js index 278a2713..e6ad0a94 100644 --- a/test/plugins/link.js +++ b/test/plugins/link.js @@ -26,7 +26,7 @@ describe("Link plugin", function() { }); this.irc.createMessage({ - message: "http://localhost:9002/basic" + msg: "http://localhost:9002/basic" }); this.irc.once("toggle", function(data) { diff --git a/test/util.js b/test/util.js index cda4a419..07478867 100644 --- a/test/util.js +++ b/test/util.js @@ -4,7 +4,7 @@ var _ = require("lodash"); var express = require("express"); function MockClient(opts) { - this.me = "test-user"; + this.user = {nick: "test-user"}; for (var k in opts) { this[k] = opts[k]; @@ -15,12 +15,12 @@ util.inherits(MockClient, EventEmitter); MockClient.prototype.createMessage = function(opts) { var message = _.extend({ - message: "dummy message", - from: "test-user", - to: "test-channel" + msg: "dummy message", + nick: "test-user", + target: "#test-channel" }, opts); - this.emit("message", message); + this.emit("privmsg", message); }; module.exports = { @@ -30,7 +30,7 @@ module.exports = { createNetwork: function() { return { channels: [{ - name: "test-channel", + name: "#test-channel", messages: [] }] };