From a2f74df35dd06cf6752c7e4109101ebee2d10373 Mon Sep 17 00:00:00 2001 From: LEGO Technix <109212476+lego-technix@users.noreply.github.com> Date: Sat, 4 Jan 2025 19:37:05 +0100 Subject: [PATCH] feat(api): use the dependency-injected usecases in integration tests to be able to use in usecases the prescriberRepository injected with the legalDocumentApiRepository --- .../team/integration/domain/usecases/get-prescriber_test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/tests/team/integration/domain/usecases/get-prescriber_test.js b/api/tests/team/integration/domain/usecases/get-prescriber_test.js index 071ed7d5238..48a290d1a4e 100644 --- a/api/tests/team/integration/domain/usecases/get-prescriber_test.js +++ b/api/tests/team/integration/domain/usecases/get-prescriber_test.js @@ -1,9 +1,11 @@ import * as sharedMembershipRepository from '../../../../../src/shared/infrastructure/repositories/membership-repository.js'; -import { getPrescriber } from '../../../../../src/team/domain/usecases/get-prescriber.js'; +import { usecases } from '../../../../../src/team/domain/usecases/index.js'; import { prescriberRepository } from '../../../../../src/team/infrastructure/repositories/prescriber-repository.js'; import { userOrgaSettingsRepository } from '../../../../../src/team/infrastructure/repositories/user-orga-settings-repository.js'; import { databaseBuilder, expect, knex } from '../../../../test-helper.js'; +const getPrescriber = usecases.getPrescriber; + describe('Integration | Team | Domain | UseCases | get-prescriber', function () { context('When prescriber does not have a userOrgaSettings', function () { it("should create it with the first membership's organization", async function () {