Make tests pass

This commit is contained in:
Jesse Wierzbinski 2023-09-13 16:49:26 -10:00
parent 91242b73bf
commit 4ced6744fa
No known key found for this signature in database
GPG key ID: F9A1E418934E40B0
2 changed files with 12 additions and 12 deletions

View file

@ -76,11 +76,11 @@ describe("POST /auth/login/", () => {
{
method: "POST",
body: formData,
redirect: "manual",
}
);
expect(response.status).toBe(302);
expect(response.headers.get("location")).toMatch(
expect(response.headers.get("Location")).toMatch(
/https:\/\/example.com\?code=/
);
@ -108,13 +108,16 @@ describe("POST /v1/oauth/token/", () => {
}
);
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const json = await response.json();
expect(response.status).toBe(200);
expect(response.headers.get("content-type")).toBe("application/json");
expect(await response.json()).toEqual({
expect(json).toEqual({
access_token: expect.any(String),
token_type: "bearer",
token_type: "Bearer",
scope: "read write",
created_at: expect.any(Number),
created_at: expect.any(String),
});
});
});