Create real channel object in tests
This commit is contained in:
parent
6dc807ef07
commit
2f1eec32b3
@ -3,6 +3,7 @@ var util = require("util");
|
|||||||
var _ = require("lodash");
|
var _ = require("lodash");
|
||||||
var express = require("express");
|
var express = require("express");
|
||||||
var Network = require("../src/models/network");
|
var Network = require("../src/models/network");
|
||||||
|
var Chan = require("../src/models/chan");
|
||||||
|
|
||||||
function MockClient(opts) {
|
function MockClient(opts) {
|
||||||
this.user = {nick: "test-user"};
|
this.user = {nick: "test-user"};
|
||||||
@ -30,10 +31,9 @@ module.exports = {
|
|||||||
createNetwork: function() {
|
createNetwork: function() {
|
||||||
return new Network({
|
return new Network({
|
||||||
host: "example.com",
|
host: "example.com",
|
||||||
channels: [{
|
channels: [new Chan({
|
||||||
name: "#test-channel",
|
name: "#test-channel"
|
||||||
messages: []
|
})]
|
||||||
}]
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
createWebserver: function() {
|
createWebserver: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user