aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils/users.js')
-rw-r--r--server/tests/utils/users.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/server/tests/utils/users.js b/server/tests/utils/users.js
index 3b560e409..0cf4e4adb 100644
--- a/server/tests/utils/users.js
+++ b/server/tests/utils/users.js
@@ -6,6 +6,7 @@ const usersUtils = {
6 createUser: createUser, 6 createUser: createUser,
7 getUserInformation: getUserInformation, 7 getUserInformation: getUserInformation,
8 getUsersList: getUsersList, 8 getUsersList: getUsersList,
9 getUsersListPaginationAndSort: getUsersListPaginationAndSort,
9 removeUser: removeUser, 10 removeUser: removeUser,
10 updateUser: updateUser 11 updateUser: updateUser
11} 12}
@@ -52,6 +53,20 @@ function getUsersList (url, end) {
52 .end(end) 53 .end(end)
53} 54}
54 55
56function getUsersListPaginationAndSort (url, start, count, sort, end) {
57 const path = '/api/v1/users'
58
59 request(url)
60 .get(path)
61 .query({ start: start })
62 .query({ count: count })
63 .query({ sort: sort })
64 .set('Accept', 'application/json')
65 .expect(200)
66 .expect('Content-Type', /json/)
67 .end(end)
68}
69
55function removeUser (url, userId, accessToken, expectedStatus, end) { 70function removeUser (url, userId, accessToken, expectedStatus, end) {
56 if (!end) { 71 if (!end) {
57 end = expectedStatus 72 end = expectedStatus