7f1d3ebc07
- move all test files from core/test to test/ - updated all imports and other references - all code inside of core/ is then application code - tests are correctly at the root level - consistent with other repos/projects Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
29 lines
771 B
JavaScript
29 lines
771 B
JavaScript
const should = require('should'),
|
|
sinon = require('sinon'),
|
|
models = require('../../../core/server/models'),
|
|
testUtils = require('../../utils'),
|
|
configUtils = require('../../utils/configUtils');
|
|
|
|
describe('Unit: models/permission', function () {
|
|
before(function () {
|
|
models.init();
|
|
});
|
|
|
|
after(function () {
|
|
sinon.restore();
|
|
configUtils.restore();
|
|
});
|
|
|
|
describe('add', function () {
|
|
it('[error] validation', function () {
|
|
return models.Permission.add({})
|
|
.then(function () {
|
|
'Should fail'.should.be.true();
|
|
})
|
|
.catch(function (err) {
|
|
err.length.should.eql(3);
|
|
});
|
|
});
|
|
});
|
|
});
|