Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1b4c881

Browse files
committed
ywdigydmf
1 parent 132bc79 commit 1b4c881

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

site/src/pages/TemplatePage/TemplateRedirectController.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ const renderTemplateRedirectController = (route: string) => {
1212
};
1313

1414
it("redirects from multi-org to single-org", async () => {
15-
const page = renderTemplateRedirectController(
15+
const { router } = renderTemplateRedirectController(
1616
`/templates/${M.MockTemplate.organization_name}/${M.MockTemplate.name}`,
1717
);
1818

1919
await waitFor(() =>
20-
expect(page.router.state.location.pathname).toEqual(
20+
expect(router.state.location.pathname).toEqual(
2121
`/templates/${M.MockTemplate.name}`,
2222
),
2323
);
@@ -28,12 +28,12 @@ it("redirects from single-org to multi-org", async () => {
2828
.spyOn(API, "getOrganizations")
2929
.mockResolvedValueOnce([M.MockDefaultOrganization, M.MockOrganization2]);
3030

31-
const page = renderTemplateRedirectController(
31+
const { router } = renderTemplateRedirectController(
3232
`/templates/${M.MockTemplate.name}`,
3333
);
3434

3535
await waitFor(() =>
36-
expect(page.router.state.location.pathname).toEqual(
36+
expect(router.state.location.pathname).toEqual(
3737
`/templates/${M.MockDefaultOrganization.name}/${M.MockTemplate.name}`,
3838
),
3939
);

0 commit comments

Comments
 (0)