diff --git a/client/src/router/__tests__/onboarding.spec.ts b/client/src/router/__tests__/onboarding.spec.ts index ad586c5f..199bc5e0 100644 --- a/client/src/router/__tests__/onboarding.spec.ts +++ b/client/src/router/__tests__/onboarding.spec.ts @@ -49,14 +49,21 @@ describe("Onboarding", () => { }); it("VV: redirect to profile next route for logged-in user with organisation", () => { - const user = useUserStore(); - user.loggedIn = true; - user.organisation = 1; - const mockNext = vi.fn(); - onboardingRedirect(routeLocation("accountProfile", "vv"), START_LOCATION, mockNext); - expect(mockNext).toHaveBeenCalledWith({ - name: "checkoutAddress", - params: { courseType: "vv" }, + const testCases = ["vv-de", "vv-it", "vv-fr"]; + testCases.forEach((testCase) => { + const user = useUserStore(); + user.loggedIn = true; + user.organisation = 1; + const mockNext = vi.fn(); + onboardingRedirect( + routeLocation("accountProfile", testCase), + START_LOCATION, + mockNext + ); + expect(mockNext).toHaveBeenCalledWith({ + name: "checkoutAddress", + params: { courseType: testCase }, + }); }); });