Skip to content

Commit abf0be9

Browse files
committed
added checks for headers to match json in update operations
1 parent 388cf05 commit abf0be9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/routes/group.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe("group API", () => {
4444
title: "Group 1",
4545
student: "64fdc67feca8a69f01b33614",
4646
});
47-
47+
expect(response.headers["content-type"]).toMatch(/json/);
4848
expect(response.status).toBe(200);
4949
expect(response.body.res).toMatch(/added group/);
5050
});
@@ -78,7 +78,7 @@ describe("group API", () => {
7878
const response = await agent
7979
.post(`/group/update/${id}`)
8080
.send({ title: "Group 1" }, { title: "Group 2" });
81-
81+
expect(response.headers["content-type"]).toMatch(/json/);
8282
expect(response.status).toBe(200);
8383
expect(response.body.res).toMatch(/updated group/);
8484
});

0 commit comments

Comments
 (0)