1
0
Fork 0
mirror of synced 2024-08-22 21:41:49 +12:00

Fix src/api/routes/system/tests/tenants.spec.ts

This commit is contained in:
Sam Rose 2024-06-28 17:37:33 +01:00
parent c77cfffd6f
commit b53f2b4e78
No known key found for this signature in database

View file

@ -36,10 +36,12 @@ describe("/api/global/tenants", () => {
headers: config.authHeaders(user2), headers: config.authHeaders(user2),
}) })
expect(res.body).toEqual({ expect(res.body).toEqual(
message: "Tenant ID does not match current user", expect.objectContaining({
status, message: "Tenant ID does not match current user",
}) status,
})
)
}) })
it("rejects non-admin", async () => { it("rejects non-admin", async () => {
@ -55,7 +57,9 @@ describe("/api/global/tenants", () => {
headers: config.authHeaders(user2), headers: config.authHeaders(user2),
}) })
expect(res.body).toEqual(config.adminOnlyResponse()) expect(res.body).toEqual(
expect.objectContaining(config.adminOnlyResponse())
)
}) })
}) })
}) })