Procházet zdrojové kódy

Update album.spec.ts

Sven Fehler před 4 měsíci
rodič
revize
49c3b697cd
1 změnil soubory, kde provedl 13 přidání a 0 odebrání
  1. 13 0
      test/album.spec.ts

+ 13 - 0
test/album.spec.ts

@@ -30,4 +30,17 @@ describe("GET /album/:id", () => {
     expect(body?.matches).toEqual(0);
     expect(body?.message).toBeDefined();
   });
+
+  //#region inv /album
+
+  it("Album path without ID yields error", async () => {
+    const res = await fetch(`${baseUrl}/album`, defaultFetchOpts);
+    const body = await res.json();
+
+    expect(res.status).toBe(400);
+
+    expect(body?.error).toEqual(true);
+    expect(body?.matches).toEqual(null);
+    expect(body?.message).toBeDefined();
+  });
 });