#1102 scope en el modelo company
This commit is contained in:
parent
eccd83aac0
commit
cc69099b37
|
@ -19,5 +19,11 @@
|
|||
"expired": {
|
||||
"type": "date"
|
||||
}
|
||||
},
|
||||
|
||||
"scope": {
|
||||
"where" :{
|
||||
"expired": null
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue