webapi-eca/testing/test_db_interface.coffee

16 lines
455 B
CoffeeScript
Raw Normal View History

2014-01-13 14:23:06 +00:00
exports.testRequire = (test) ->
db = require '../js-coffee/db_interface'
test.ok db, 'DB interface loaded'
db { logType: 2 }
test.ok conf.isReady(), 'File exists'
test.ok conf.getHttpPort(), 'HTTP port exists'
test.ok conf.getDBPort(), 'DB port exists'
test.ok conf.getCryptoKey(), 'Crypto key exists'
test.ok conf.getSessionSecret(), 'Session Secret exists'
conf { relPath: 'wrongpath' }
test.strictEqual conf.isReady(), false
test.done()