Skip to content

Commit b0b8644

Browse files
Merge pull request #313 from tcet-opensource/303-fix-all-present-testcases
[Bug] fixed issues with all present testcases
2 parents 1f2a604 + 6a536dc commit b0b8644

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

test/routes/accreditation.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ describe("checking accreditation functions", () => {
6060

6161
it("read accreditation", async () => {
6262
const response = await agent
63-
.post("/accreditation/list")
63+
.get("/accreditation/list")
6464
.send({ name: "xyz" });
65-
expect(response.body.res).not.toBeNull();
65+
expect(response.status).toBe(200);
66+
expect(response.body.res).toBeDefined();
6667
});
6768

6869
it("update accreditation", async () => {

test/routes/infrastructure.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ describe("Infrastructure API", () => {
7878

7979
it("should read infrastructure", async () => {
8080
const response = await agent
81-
.post("/infrastructure/list")
81+
.get("/infrastructure/list")
8282
.send({ name: "Building A" });
83-
expect(response.body.res).not.toBeNull();
83+
expect(response.status).toBe(200);
84+
expect(response.body.res).toBeDefined();
8485
});
8586

8687
it("should update infrastructure", async () => {

0 commit comments

Comments
 (0)