aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/users/user-subscriptions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils/users/user-subscriptions.ts')
-rw-r--r--server/tests/utils/users/user-subscriptions.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/tests/utils/users/user-subscriptions.ts b/server/tests/utils/users/user-subscriptions.ts
index 323e5de58..852f590cf 100644
--- a/server/tests/utils/users/user-subscriptions.ts
+++ b/server/tests/utils/users/user-subscriptions.ts
@@ -36,6 +36,17 @@ function listUserSubscriptionVideos (url: string, token: string, sort = '-create
36 }) 36 })
37} 37}
38 38
39function getUserSubscription (url: string, token: string, uri: string, statusCodeExpected = 200) {
40 const path = '/api/v1/users/me/subscriptions/' + uri
41
42 return makeGetRequest({
43 url,
44 path,
45 token,
46 statusCodeExpected
47 })
48}
49
39function removeUserSubscription (url: string, token: string, uri: string, statusCodeExpected = 204) { 50function removeUserSubscription (url: string, token: string, uri: string, statusCodeExpected = 204) {
40 const path = '/api/v1/users/me/subscriptions/' + uri 51 const path = '/api/v1/users/me/subscriptions/' + uri
41 52
@@ -52,6 +63,7 @@ function removeUserSubscription (url: string, token: string, uri: string, status
52export { 63export {
53 addUserSubscription, 64 addUserSubscription,
54 listUserSubscriptions, 65 listUserSubscriptions,
66 getUserSubscription,
55 listUserSubscriptionVideos, 67 listUserSubscriptionVideos,
56 removeUserSubscription 68 removeUserSubscription
57} 69}