refactor: refs #7764 include options parameter in role retrieval for user creation tests
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javi Gallego 2025-02-21 12:53:08 +01:00
parent 6f5a966c55
commit a15cf04a4c
1 changed files with 2 additions and 2 deletions

View File

@ -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();