refs #4928 findById
This commit is contained in:
parent
522000cd04
commit
b72cb64bf8
|
@ -73,7 +73,7 @@ describe('loopback model Supplier', () => {
|
|||
await supplierTwo.updateAttribute('isPayMethodChecked', true, options);
|
||||
await supplierTwo.updateAttribute('payMethodFk', 5, options);
|
||||
|
||||
const result = await models.Supplier.findOne({where: {id: 442}}, options);
|
||||
const result = await models.Supplier.findById(442, null, options);
|
||||
|
||||
expect(result.isPayMethodChecked).toEqual(true);
|
||||
await tx.rollback();
|
||||
|
@ -91,7 +91,7 @@ describe('loopback model Supplier', () => {
|
|||
await supplierTwo.updateAttribute('isPayMethodChecked', true, options);
|
||||
await supplierTwo.updateAttribute('payMethodFk', 2, options);
|
||||
|
||||
const result = await models.Supplier.findOne({where: {id: 442}}, options);
|
||||
const result = await models.Supplier.findById(442, null, options);
|
||||
|
||||
expect(result.isPayMethodChecked).toEqual(false);
|
||||
await tx.rollback();
|
||||
|
@ -109,11 +109,11 @@ describe('loopback model Supplier', () => {
|
|||
await supplierTwo.updateAttribute('payMethodFk', 2, options);
|
||||
await supplierTwo.updateAttribute('isPayMethodChecked', true, options);
|
||||
await supplierTwo.updateAttribute('payDay', 5, options);
|
||||
const firstResult = await models.Supplier.findOne({where: {id: 442}}, options);
|
||||
const firstResult = await models.Supplier.findById(442, null, options);
|
||||
|
||||
await supplierTwo.updateAttribute('isPayMethodChecked', true, options);
|
||||
await supplierTwo.updateAttribute('payDemFk', 1, options);
|
||||
const secondResult = await models.Supplier.findOne({where: {id: 442}}, options);
|
||||
const secondResult = await models.Supplier.findById(442, null, options);
|
||||
|
||||
expect(firstResult.isPayMethodChecked).toEqual(false);
|
||||
expect(secondResult.isPayMethodChecked).toEqual(false);
|
||||
|
|
Loading…
Reference in New Issue