mirror of
https://github.com/thelounge/thelounge
synced 2024-11-25 05:20:21 +00:00
Fix link test not using network model
This commit is contained in:
parent
e0fb454223
commit
4a7fc0544e
1 changed files with 4 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue