Add logged user and user communities endpoint

This commit is contained in:
Aslan 2025-12-31 15:00:18 +01:00
parent ddcc591d12
commit a85330e8cf
7 changed files with 180 additions and 3 deletions

View file

@ -121,6 +121,22 @@ test("can accept invite", async () => {
assert.equal(responseGet.members.length === 2, true);
});
test("can get user communities", async () => {
const response = await apiGet(
`user/${state.userId2}/communities`,
state.token2,
);
assert.equal(response.id, state.userId2);
assert.equal(response.communities.length === 1, true);
assert.equal(response.communities[0].id, state.communityId);
assert.equal(response.communities[0].name, state.communityName);
assert.equal(
response.communities[0].description,
state.communityDescription,
);
});
test("can get invite", async () => {
const response = await apiGet(`invite/${state.inviteId}`);