Fix src/api/routes/system/tests/tenants.spec.ts
This commit is contained in:
parent
c77cfffd6f
commit
b53f2b4e78
1 changed files with 9 additions and 5 deletions
|
@ -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())
|
||||||
|
)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue