2015-02-14 18:42:18 +00:00
|
|
|
var should = require('should');
|
|
|
|
|
|
|
|
var Server = require('../../lib/server.js');
|
|
|
|
|
|
|
|
describe('Server', function() {
|
2017-03-31 15:08:56 +00:00
|
|
|
describe('generateId()', function() {
|
|
|
|
it('should include title', function() {
|
2017-03-26 11:22:13 +00:00
|
|
|
var server = new Server(null, null, null, {title: 'title.with.lot.of.dots'});
|
2017-03-31 15:08:56 +00:00
|
|
|
server.generateId().should.eql('title-with-lot-of-dots');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2015-02-14 18:42:18 +00:00
|
|
|
describe('toJSON()', function() {
|
|
|
|
it('should include title', function() {
|
2017-03-26 11:22:13 +00:00
|
|
|
var server = new Server(null, null, null, {title: 'test'});
|
2015-02-14 18:42:18 +00:00
|
|
|
server.toJSON().should.have.property('title', 'test');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|