Skip to content

Commit

Permalink
test: refactor old tests - system search was moved to /search
Browse files Browse the repository at this point in the history
  • Loading branch information
Tethik committed Jun 6, 2024
1 parent 7d9b304 commit 0977bcc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions api/src/resources/gram/v1/systems/list.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,22 @@ describe("systems.list", () => {
});

const res = await request(app)
.get("/api/v1/systems?filter=search")
.get("/api/v1/systems?filter=batch")
.set("Authorization", token);
expect(res.status).toBe(500);
});

it("should return 200 with dummy results", async () => {
const res = await request(app)
.get("/api/v1/systems?filter=search")
.get("/api/v1/systems?filter=batch")
.set("Authorization", token);
expect(res.status).toBe(200);
expect(res.body.systems[0]).toEqual(sampleOwnedSystem);
});

it("should return 200 with dummy results (team filter)", async () => {
const res = await request(app)
.get("/api/v1/systems?filter=team")
.set("Authorization", token);
expect(res.status).toBe(200);
expect(res.body.systems[0]).toEqual(sampleOwnedSystem);
Expand Down

0 comments on commit 0977bcc

Please sign in to comment.