Add tabbed settings and system shell
This commit is contained in:
@@ -179,6 +179,29 @@ describe("authentication boundary", () => {
|
||||
});
|
||||
expect(update.statusCode).toBe(503);
|
||||
expect(update.json()).toMatchObject({ error: { code: "UPDATES_UNAVAILABLE" } });
|
||||
|
||||
const check = await app.inject({
|
||||
method: "POST",
|
||||
url: "/api/system/update/check",
|
||||
headers: {
|
||||
...mutationHeaders(token),
|
||||
cookie: `${CSRF_COOKIE}=${token}; ${SESSION_COOKIE}=${sessionCookie?.value ?? ""}`
|
||||
}
|
||||
});
|
||||
expect(check.statusCode).toBe(503);
|
||||
expect(check.json()).toMatchObject({ error: { code: "UPDATES_UNAVAILABLE" } });
|
||||
|
||||
const invalidPower = await app.inject({
|
||||
method: "POST",
|
||||
url: "/api/system/power",
|
||||
headers: {
|
||||
...mutationHeaders(token),
|
||||
cookie: `${CSRF_COOKIE}=${token}; ${SESSION_COOKIE}=${sessionCookie?.value ?? ""}`
|
||||
},
|
||||
payload: { action: "factory-reset" }
|
||||
});
|
||||
expect(invalidPower.statusCode).toBe(400);
|
||||
expect(invalidPower.json()).toMatchObject({ error: { code: "INVALID_POWER_ACTION" } });
|
||||
});
|
||||
|
||||
it("does not expose update state without authentication", async () => {
|
||||
|
||||
Reference in New Issue
Block a user