From a15cf04a4c3d16a08c6e797fd5cd06c43ef482ad Mon Sep 17 00:00:00 2001 From: jgallego Date: Fri, 21 Feb 2025 12:53:08 +0100 Subject: [PATCH] refactor: refs #7764 include options parameter in role retrieval for user creation tests --- .../client/back/methods/client/specs/createWithUser.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/client/back/methods/client/specs/createWithUser.spec.js b/modules/client/back/methods/client/specs/createWithUser.spec.js index cf68f089ec..fdc0797958 100644 --- a/modules/client/back/methods/client/specs/createWithUser.spec.js +++ b/modules/client/back/methods/client/specs/createWithUser.spec.js @@ -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();