Test last page search

This commit is contained in:
Adria Navarro 2023-05-08 15:43:40 +02:00
parent 3de3ddfa62
commit c05a93f875
1 changed files with 11 additions and 0 deletions

View File

@ -185,6 +185,17 @@ describe("/api/global/groups", () => {
hasNextPage: true,
})
})
it("bookmarking the last page, should return last page info", async () => {
const result = await config.api.groups.searchUsers(groupId, {
bookmark: users[20]._id,
})
expect(result.body).toEqual({
users: users.slice(20),
bookmark: undefined,
hasNextPage: false,
})
})
})
})
})