Backend tests fixed

This commit is contained in:
Juan Ferrer Toribio 2018-01-31 13:40:26 +01:00
parent cba0645f92
commit 9090c56c64
9 changed files with 6 additions and 6 deletions

View File

@ -3,13 +3,13 @@ const catchErrors = require('../../../../../../services/utils/jasmineHelpers').c
describe('Client listWorkers', () => {
it('should call the listWorkers()', done => {
let callback = (error, result) => {
if (error) return catchErrors(done)(error);
app.models.Client.listWorkers()
.then(result => {
let amountOfEmployees = Object.keys(result).length;
expect(amountOfEmployees).toEqual(6);
done();
};
app.models.Client.listWorkers(callback);
})
.catch(catchErrors(done));
});
});

View File

@ -1,4 +1,4 @@
const totalGreuge = require('../total');
const totalGreuge = require('../sumAmount');
const catchErrors = require('../../../../../../services/utils/jasmineHelpers').catchErrors;
describe('Greuge totalGreuge()', () => {

View File

@ -26,7 +26,7 @@ function vnBoot(app, rootDir, rootModule) {
// View
let viewDir = path.join(rootDir, '../client');
let viewDir = `${rootDir}/../client`;
if (fs.existsSync(viewDir)) {
app.set('view engine', 'ejs');