diff --git a/src/components/atoms/OakIcon/OakIcon.test.tsx b/src/components/atoms/OakIcon/OakIcon.test.tsx index 547009a5..c8fc7112 100644 --- a/src/components/atoms/OakIcon/OakIcon.test.tsx +++ b/src/components/atoms/OakIcon/OakIcon.test.tsx @@ -75,6 +75,17 @@ describe("generateOakIconURL", () => { expect(generateOakIconURL("home")).toBe( "https://res.cloudinary.com/mock-cloudinary-cloud/image/upload/v1699887218/icons/gvqxjxcw07ei2kkmwnes.svg", ); - expect(generateOakIconURL("banana-sandwich")).toBe(undefined); + }); + + it("is returns url for question mark when the string is not a valid icon name", () => { + expect(generateOakIconURL("banana-sandwich")).toBe( + "https://res.cloudinary.com/mock-cloudinary-cloud/image/upload/v1706872277/icons/question-mark.svg", + ); + }); + + it("is returns url for books when the string is not a valid subject icon name", () => { + expect(generateOakIconURL("subject-potions")).toBe( + "https://res.cloudinary.com/mock-cloudinary-cloud/image/upload/v1699953657/icons/hz4l3iq6i68kazvkvorq.svg", + ); }); });