mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
test(etapi): port basic-auth
This commit is contained in:
@@ -38,4 +38,17 @@ describe("basic-auth", () => {
|
||||
.auth("wrong", token, { "type": "basic"})
|
||||
.expect(401);
|
||||
});
|
||||
|
||||
it("logs out", async () => {
|
||||
await supertest(app)
|
||||
.post("/etapi/auth/logout")
|
||||
.auth(USER, token, { "type": "basic"})
|
||||
.expect(204);
|
||||
|
||||
// Ensure we can't access it anymore
|
||||
await supertest(app)
|
||||
.get("/etapi/notes/root")
|
||||
.auth(USER, token, { "type": "basic"})
|
||||
.expect(401);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user