Skip to content

Commit

Permalink
fixed some test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhravHussen committed Jul 25, 2023
1 parent 624be90 commit 9752bd0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tickets/src/test/find-ticket.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ it("must be signed in to find a ticket", async () => {
});

it("must return an error if the ticket is not found", async () => {
request(app)
await request(app)
.get(`/api/tickets/647abea0ed015d62155716b8`)
.set("Cookie", mockSignIn(true))
.send({})
.expect(404);
});

it("must return a error id id is invalid", async () => {
request(app)
await request(app)
.get(`/api/tickets/sdsdsd`)
.set("Cookie", mockSignIn(true))
.send({})
Expand Down
2 changes: 1 addition & 1 deletion tickets/src/test/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ beforeAll(async () => {
process.env.JWT_SECRET = "test";
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

const mongo = await MongoMemoryServer.create();
mongo = await MongoMemoryServer.create();
const mongoUri = mongo.getUri();

await mongoose.connect(mongoUri, {});
Expand Down

0 comments on commit 9752bd0

Please sign in to comment.