1
0
Fork 0
mirror of synced 2024-07-07 23:35: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),
})
expect(res.body).toEqual({
message: "Tenant ID does not match current user",
status,
})
expect(res.body).toEqual(
expect.objectContaining({
message: "Tenant ID does not match current user",
status,
})
)
})
it("rejects non-admin", async () => {
@ -55,7 +57,9 @@ describe("/api/global/tenants", () => {
headers: config.authHeaders(user2),
})
expect(res.body).toEqual(config.adminOnlyResponse())
expect(res.body).toEqual(
expect.objectContaining(config.adminOnlyResponse())
)
})
})
})