fix: unit test vv -> vv-de vv-it vv-fr
This commit is contained in:
parent
bf1353553b
commit
213c70691a
|
|
@ -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 },
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue