Fix link test not using network model

This commit is contained in:
Pavel Djundik 2016-03-20 16:39:59 +02:00 committed by Maxime Poulin
parent e0fb454223
commit 4a7fc0544e

View file

@ -2,6 +2,7 @@ var EventEmitter = require("events").EventEmitter;
var util = require("util");
var _ = require("lodash");
var express = require("express");
var Network = require("../src/models/network");
function MockClient(opts) {
this.user = {nick: "test-user"};
@ -13,7 +14,6 @@ function MockClient(opts) {
util.inherits(MockClient, EventEmitter);
MockClient.prototype.createMessage = function(opts) {
var message = _.extend({
message: "dummy message",
nick: "test-user",
@ -28,12 +28,13 @@ module.exports = {
return new MockClient();
},
createNetwork: function() {
return {
return new Network({
host: "example.com",
channels: [{
name: "#test-channel",
messages: []
}]
};
});
},
createWebserver: function() {
return express();