Created Back test for newSupplier

This commit is contained in:
Pau 2022-10-17 10:17:56 +02:00
parent dc53aac163
commit a4243e14c5
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
const app = require('vn-loopback/server/server');
describe('Supplier newSupplier()', () => {
const supplier = {
name: 'TestSupplier-1'
};
it('should create a new supplier containing only the name', async() => {
const result = await app.models.Supplier.newSupplier(supplier);
expect(result.payDemFk).toEqual('TestSupplier-1');
expect(result.payDemFk).toEqual(1);
});
});