diff --git a/app/services/cms/__test__/getStrapiEntryFromApi.test.ts b/app/services/cms/__test__/getStrapiEntryFromApi.test.ts index 27af942d6..62b3fc0b2 100644 --- a/app/services/cms/__test__/getStrapiEntryFromApi.test.ts +++ b/app/services/cms/__test__/getStrapiEntryFromApi.test.ts @@ -1,9 +1,6 @@ import axios from "axios"; import { getStrapiEntryFromApi } from "~/services/cms/getStrapiEntryFromApi"; -import { - defaultLocale, - stagingLocale, -} from "~/services/cms/models/StrapiLocale"; +import { stagingLocale } from "~/services/cms/models/StrapiLocale"; import type { GetStrapiEntryOpts } from "../filters"; const API_URL = "test://cms/api/"; @@ -23,17 +20,12 @@ describe("services/cms", () => { apiId: "pages", locale: stagingLocale, }; - const defaultResponseData = { data: { data: dataResponse } }; - const emptyResponseData = { data: [] }; - const expectedRequestUrl = `${API_URL}pages?populate=*&pLevel&locale=de`; const expectedStagingRequestUrl = `${API_URL}pages?populate=*&pLevel&locale=sg`; const axiosGetSpy = vi.spyOn(axios, "get"); beforeEach(() => { - axiosGetSpy - .mockResolvedValue(defaultResponseData) - .mockResolvedValueOnce(emptyResponseData); + axiosGetSpy.mockResolvedValue({ data: { data: dataResponse } }); }); afterEach(() => { diff --git a/app/services/cms/__test__/getStrapiEntryFromFile.test.ts b/app/services/cms/__test__/getStrapiEntryFromFile.test.ts index 7bbc7b44e..77f17a46c 100644 --- a/app/services/cms/__test__/getStrapiEntryFromFile.test.ts +++ b/app/services/cms/__test__/getStrapiEntryFromFile.test.ts @@ -66,17 +66,6 @@ describe("services/cms", () => { ).toEqual([footerData]); }); - describe("when no entry exists for the given locale", () => { - it("returns default entry", async () => { - expect( - await getStrapiEntryFromFile({ - apiId: "footer", - locale: "en", - }), - ).toEqual([footerData]); - }); - }); - it("can filter by property", async () => { expect( await getStrapiEntryFromFile({ @@ -127,15 +116,5 @@ describe("services/cms", () => { }), ).toStrictEqual([]); }); - - it("falls back to default locale", async () => { - expect( - await getStrapiEntryFromFile({ - apiId: "pages", - filters: [{ field: "slug", value: impressumPath }], - locale: "en", - }), - ).toEqual([impressum]); - }); }); });