thelounge/test/models/network.js

33 lines
727 B
JavaScript
Raw Normal View History

"use strict";
var expect = require("chai").expect;
var Chan = require("../../src/models/chan");
var Network = require("../../src/models/network");
describe("Network", function() {
describe("#export()", function() {
it("should produce an valid object", function() {
var network = new Network({name: "networkName"});
network.channels.push(new Chan({name: "#thelounge"}));
network.channels.push(new Chan({name: "&foobar"}));
expect(network.export()).to.deep.equal({
name: "networkName",
host: "",
port: 6667,
tls: false,
password: "",
username: "",
realname: "",
commands: [],
nick: "",
join: "#thelounge,&foobar",
2016-04-03 05:12:49 +00:00
ip: null,
hostname: null
});
});
});
});