refactor: refs #7764 include options parameter in role retrieval for user creation tests
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
6f5a966c55
commit
a15cf04a4c
|
@ -70,7 +70,7 @@ describe('Client Create', () => {
|
|||
|
||||
const client = await models.Client.createWithUser(newAccount, options);
|
||||
const account = await models.VnUser.findOne({where: {name: newAccount.userName}}, options);
|
||||
const supplierRole = await models.VnRole.findOne({where: {name: 'supplier'}});
|
||||
const supplierRole = await models.VnRole.findOne({where: {name: 'supplier'}}, options);
|
||||
|
||||
expect(account.roleFk).toEqual(supplierRole.id);
|
||||
expect(province.autonomy().hasDailyInvoice).toBeTruthy();
|
||||
|
@ -106,7 +106,7 @@ describe('Client Create', () => {
|
|||
|
||||
const client = await models.Client.createWithUser(newAccount, options);
|
||||
const vnUser = await models.VnUser.findOne({where: {name: newAccount.userName}}, options);
|
||||
const customerRole = await models.VnRole.findOne({where: {name: 'customer'}});
|
||||
const customerRole = await models.VnRole.findOne({where: {name: 'customer'}}, options);
|
||||
|
||||
expect(vnUser.roleFk).toEqual(customerRole.id);
|
||||
expect(province.autonomy.hasDailyInvoice).toBeFalsy();
|
||||
|
|
Loading…
Reference in New Issue