This commit is contained in:
parent
c1da4815cb
commit
361c2b4cad
|
@ -126,12 +126,12 @@ describe('loopback model Supplier', () => {
|
|||
});
|
||||
|
||||
describe('after save observer', () => {
|
||||
fit('should update the account attribute when a new supplier is created', async() => {
|
||||
it('should update the account attribute when a new supplier is created', async() => {
|
||||
const tx = await models.Supplier.beginTransaction({});
|
||||
const options = {transaction: tx};
|
||||
|
||||
try {
|
||||
const newSupplier = await models.Supplier.create({id: '6969', name: 'Alfred Pennyworth'}, options);
|
||||
const newSupplier = await models.Supplier.create({id: '9999', name: 'Alfred Pennyworth'}, options);
|
||||
const fetchedSupplier = await models.Supplier.findById(newSupplier.id, null, options);
|
||||
|
||||
expect(fetchedSupplier.account).toEqual('4100006969');
|
||||
|
|
Loading…
Reference in New Issue