mirror of
https://github.com/thelounge/thelounge
synced 2024-11-27 14:30:57 +00:00
33 lines
767 B
JavaScript
33 lines
767 B
JavaScript
"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.setNick("chillin`");
|
|
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: "chillin`",
|
|
join: "#thelounge,&foobar",
|
|
ip: null,
|
|
hostname: null
|
|
});
|
|
});
|
|
});
|
|
});
|