From 86d13ec2aa94ec10810ddf9c8b33314bd4968791 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 29 Nov 2017 13:18:05 +0100 Subject: Users list only available when use is authenticated And has a special right --- server/tests/utils/users.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/tests/utils') diff --git a/server/tests/utils/users.ts b/server/tests/utils/users.ts index 12569dd42..ce04b9d96 100644 --- a/server/tests/utils/users.ts +++ b/server/tests/utils/users.ts @@ -76,17 +76,18 @@ function getUserVideoRating (url: string, accessToken: string, videoId: number) .expect('Content-Type', /json/) } -function getUsersList (url: string) { +function getUsersList (url: string, accessToken: string) { const path = '/api/v1/users' return request(url) .get(path) .set('Accept', 'application/json') + .set('Authorization', 'Bearer ' + accessToken) .expect(200) .expect('Content-Type', /json/) } -function getUsersListPaginationAndSort (url: string, start: number, count: number, sort: string) { +function getUsersListPaginationAndSort (url: string, accessToken: string, start: number, count: number, sort: string) { const path = '/api/v1/users' return request(url) @@ -95,6 +96,7 @@ function getUsersListPaginationAndSort (url: string, start: number, count: numbe .query({ count }) .query({ sort }) .set('Accept', 'application/json') + .set('Authorization', 'Bearer ' + accessToken) .expect(200) .expect('Content-Type', /json/) } -- cgit v1.2.3