From 43465834c318f1f837094b4f27a8084f0d26b44c Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sat, 1 Mar 2025 23:37:15 +0100 Subject: [PATCH] Specify languages when needed --- api/tests/movies/get-all-movies.test.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/api/tests/movies/get-all-movies.test.ts b/api/tests/movies/get-all-movies.test.ts index f383687a..05b1eedc 100644 --- a/api/tests/movies/get-all-movies.test.ts +++ b/api/tests/movies/get-all-movies.test.ts @@ -231,16 +231,14 @@ describe("Get all movies", () => { expectStatus(resp, body).toBe(200); expect(body.items[0]).toMatchObject({ slug: bubble.slug, - name: bubble.translations.en.name, + name: expect.any(String), poster: { - source: bubble.translations.ja.poster, + source: expect.any(String), }, thumbnail: { - source: bubble.translations.ja.thumbnail, + source: expect.any(String), }, banner: null, - // we fallback to the translated value when the original is null. - logo: { source: bubble.translations.en.logo }, }); expect(body.items[1]).toMatchObject({ slug: dune.slug, @@ -257,16 +255,14 @@ describe("Get all movies", () => { expectStatus(resp, body).toBe(200); expect(body.items[0]).toMatchObject({ slug: bubble.slug, - name: bubble.translations.en.name, + name: expect.any(String), poster: { - source: bubble.translations.ja.poster, + source: expect.any(String), }, thumbnail: { - source: bubble.translations.ja.thumbnail, + source: expect.any(String), }, banner: null, - // we fallback to the translated value when the original is null. - logo: { source: bubble.translations.en.logo }, }); expect(body.items[1]).toMatchObject({ slug: dune.slug, @@ -277,6 +273,7 @@ describe("Get all movies", () => { const [resp, body] = await getMovies({ limit: 2, filter: "tags eq gravity", + langs: "en", }); expectStatus(resp, body).toBe(200); @@ -290,6 +287,7 @@ describe("search", () => { const [resp, body] = await getMovies({ limit: 2, query: "bub", + langs: "en", }); expectStatus(resp, body).toBe(200); @@ -300,6 +298,7 @@ describe("search", () => { const [resp, body] = await getMovies({ limit: 2, query: "buboeuoeunhoeu", + langs: "en", }); expectStatus(resp, body).toBe(200);