Fix link test not using network model
This commit is contained in:
parent
e0fb454223
commit
4a7fc0544e
@ -2,6 +2,7 @@ var EventEmitter = require("events").EventEmitter;
|
|||||||
var util = require("util");
|
var util = require("util");
|
||||||
var _ = require("lodash");
|
var _ = require("lodash");
|
||||||
var express = require("express");
|
var express = require("express");
|
||||||
|
var Network = require("../src/models/network");
|
||||||
|
|
||||||
function MockClient(opts) {
|
function MockClient(opts) {
|
||||||
this.user = {nick: "test-user"};
|
this.user = {nick: "test-user"};
|
||||||
@ -13,7 +14,6 @@ function MockClient(opts) {
|
|||||||
util.inherits(MockClient, EventEmitter);
|
util.inherits(MockClient, EventEmitter);
|
||||||
|
|
||||||
MockClient.prototype.createMessage = function(opts) {
|
MockClient.prototype.createMessage = function(opts) {
|
||||||
|
|
||||||
var message = _.extend({
|
var message = _.extend({
|
||||||
message: "dummy message",
|
message: "dummy message",
|
||||||
nick: "test-user",
|
nick: "test-user",
|
||||||
@ -28,12 +28,13 @@ module.exports = {
|
|||||||
return new MockClient();
|
return new MockClient();
|
||||||
},
|
},
|
||||||
createNetwork: function() {
|
createNetwork: function() {
|
||||||
return {
|
return new Network({
|
||||||
|
host: "example.com",
|
||||||
channels: [{
|
channels: [{
|
||||||
name: "#test-channel",
|
name: "#test-channel",
|
||||||
messages: []
|
messages: []
|
||||||
}]
|
}]
|
||||||
};
|
});
|
||||||
},
|
},
|
||||||
createWebserver: function() {
|
createWebserver: function() {
|
||||||
return express();
|
return express();
|
||||||
|
Loading…
Reference in New Issue
Block a user