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