Skip to content

Commit

Permalink
update status code
Browse files Browse the repository at this point in the history
  • Loading branch information
Yen Truong committed May 6, 2024
1 parent fe0cd97 commit 7673f7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/validation/ApiResponseValidator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ it("fails for a response without a meta property", () => {
});

it("fails for a response with an API error", () => {
const validationResponse = ApiResponseValidator.validate(errorResponse, 500);
const validationResponse = ApiResponseValidator.validate(errorResponse, 401);
expect(validationResponse).toBeInstanceOf(ApiError);
expect(validationResponse?.message).toEqual("Invalid API Key");
expect(validationResponse?.statusCode).toEqual(500);
expect(validationResponse?.statusCode).toEqual(401);
expect(validationResponse?.apiCode).toEqual(1);
expect(validationResponse?.type).toEqual("FATAL_ERROR");
});

0 comments on commit 7673f7e

Please sign in to comment.