Skip to content

Commit

Permalink
Updating user integration test after refactoring
Browse files Browse the repository at this point in the history
Signed-off-by: Prakhar Kumar <prakhar.meerut@gmail.com>
  • Loading branch information
Prakhar-FF13 authored and pankajjs committed Jan 26, 2025
1 parent 75e297a commit 3b2fefe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/integration/users.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1488,12 +1488,12 @@ describe("Users", function () {
});

it("should handle errors gracefully if getUsersWithIncompleteTasks fails", async function () {
Sinon.stub(userService, "getUsersWithIncompleteTasks").rejects(new Error(INTERNAL_SERVER_ERROR));
Sinon.stub(userService, "getUsersWithIncompleteTasks").rejects(new Error(SOMETHING_WENT_WRONG));

const res = await chai.request(app).get("/users?departed=true&dev=true");

expect(res).to.have.status(500);
expect(res.body.message).to.be.equal(INTERNAL_SERVER_ERROR);
expect(res).to.have.status(503);
expect(res.body.message).to.be.equal(SOMETHING_WENT_WRONG);
});
});

Expand Down

0 comments on commit 3b2fefe

Please sign in to comment.