arma-server-web-admin/test/lib/server.js

20 lines
552 B
JavaScript
Raw Normal View History

require('should')
2015-02-14 18:42:18 +00:00
var Server = require('../../lib/server.js')
2015-02-14 18:42:18 +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')
})
})
describe('toJSON()', function () {
it('should include title', function () {
var server = new Server(null, null, {title: 'test'})
server.toJSON().should.have.property('title', 'test')
})
})
})