#1102 scope en el modelo company

This commit is contained in:
Gerard 2019-02-18 14:40:50 +01:00
parent eccd83aac0
commit cc69099b37
2 changed files with 15 additions and 0 deletions

View File

@ -19,5 +19,11 @@
"expired": {
"type": "date"
}
},
"scope": {
"where" :{
"expired": null
}
}
}

View File

@ -0,0 +1,9 @@
const app = require('vn-loopback/server/server');
describe('loopback model Company', () => {
it('should check that the company FTH doesnt exists', async() => {
let result = await app.models.Company.findOne({where: {code: 'FTH'}});
expect(result).toBeFalsy();
});
});