Added: note in backend

This commit is contained in:
2024-05-16 18:05:05 +02:00
parent c9b8246218
commit c6b3efad4e
3 changed files with 17 additions and 1 deletions

View File

@ -73,6 +73,15 @@ describe("POST /api/v1/review/add", () => {
expect(res.statusCode).toBe(400);
});
test("should drop 201 (missing note)", async () => {
const jwt = await login();
const body: any = { ...addExam };
delete body.note;
const res = await request.post(url).set("Cookie", jwt).send(body);
expect(res.statusCode).toBe(201);
})
test("should drop 201", async () => {
const jwt = await login();
const res = await request.post(url).set("Cookie", jwt).send(addExam);