Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarvelle committed Feb 17, 2025
1 parent 4962600 commit 81f971c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/common/__tests__/SiteNav-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,13 @@ import SiteNavMyPage from "../siteNav/SiteNavMyPage";

test("component/SiteNav learningpaths", () => {
const navLinks = shallow(<SiteNav authenticated={false} localCloseSidebars={noop} isAdmin={false} />).find(Link);
expect(navLinks.length).toBe(2);
expect(navLinks.at(0).props().to).toEqual({
pathname: "/minside",
search: "?openModal=true",
});
expect(navLinks.at(1).props().to).toBe("/learningpaths");
expect(navLinks.length).toBe(0);
});

test("component/SiteNavSessionAction not authenticated", () => {
const navLinks = shallow(<SiteNavSessionAction authenticated={false} localCloseSidebars={noop} />).find(Link);
expect(navLinks.length).toBe(1);
expect(navLinks.at(0).props().to).toBe("/login");
expect(navLinks.at(0).props().to).toBe("/minside");
});

test("component/SiteNavSessionAction authenticated", () => {
Expand Down

0 comments on commit 81f971c

Please # to comment.