From 3a6280cecaf0380abe1d340a6f4a7d0b82bc8429 Mon Sep 17 00:00:00 2001 From: jusax23 Date: Wed, 29 Mar 2023 13:12:39 +0200 Subject: [PATCH] added an admin test --- tests/tests/post.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/tests/post.js b/tests/tests/post.js index f6e7518..0b326ac 100644 --- a/tests/tests/post.js +++ b/tests/tests/post.js @@ -138,6 +138,30 @@ const list = [ server: "localhost:7224", accountKey: accountKey + "lol" }, "error", "auth"); + }], ["admin", async (req) => { + await req({ + "authorization": `Digest name=${name1} server=localhost:7224 accountKey=${accountKey}` + }, "getAccounts", {}, "ok", [ + { + accID: 1, + rights: 65535, + name: "testUser1", + viewable: true, + deleted: false, + maxRooms: 2, + maxRoomSize: 10, + maxUsersPerRoom: 2 + }, { + accID: null, + rights: 3, + name: "testUser2", + viewable: true, + deleted: true, + maxRooms: 2, + maxRoomSize: 10, + maxUsersPerRoom: 2 + } + ]); }], ["room Owner", async (req) => { await req({ "authorization": `Digest name=${name1} server=localhost:7224 accountKey=${accountKey}`