aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/check-params/video-blacklist.ts12
-rw-r--r--server/tests/utils/video-blacklist.ts6
2 files changed, 9 insertions, 9 deletions
diff --git a/server/tests/api/check-params/video-blacklist.ts b/server/tests/api/check-params/video-blacklist.ts
index 80e6f8011..eb16b3af0 100644
--- a/server/tests/api/check-params/video-blacklist.ts
+++ b/server/tests/api/check-params/video-blacklist.ts
@@ -81,10 +81,10 @@ describe('Test video blacklist API validators', function () {
81 }) 81 })
82 82
83 describe('When removing a video in blacklist', function () { 83 describe('When removing a video in blacklist', function () {
84 const basePath = '/api/v1/blacklist/' 84 const basePath = '/api/v1/videos/'
85 85
86 it('Should fail with a non authenticated user', async function () { 86 it('Should fail with a non authenticated user', async function () {
87 const path = basePath + server.video.id 87 const path = basePath + server.video.id + '/blacklist'
88 88
89 await request(server.url) 89 await request(server.url)
90 .delete(path) 90 .delete(path)
@@ -94,7 +94,7 @@ describe('Test video blacklist API validators', function () {
94 }) 94 })
95 95
96 it('Should fail with a non admin user', async function () { 96 it('Should fail with a non admin user', async function () {
97 const path = basePath + server.video.id 97 const path = basePath + server.video.id + '/blacklist'
98 98
99 await request(server.url) 99 await request(server.url)
100 .delete(path) 100 .delete(path)
@@ -104,7 +104,7 @@ describe('Test video blacklist API validators', function () {
104 }) 104 })
105 105
106 it('Should fail with an incorrect id', async function () { 106 it('Should fail with an incorrect id', async function () {
107 const path = basePath + 'foobar' 107 const path = basePath + 'foobar/blacklist'
108 108
109 await request(server.url) 109 await request(server.url)
110 .delete(path) 110 .delete(path)
@@ -115,7 +115,7 @@ describe('Test video blacklist API validators', function () {
115 115
116 it('Should fail with a not blacklisted video', async function () { 116 it('Should fail with a not blacklisted video', async function () {
117 // The video was not added to the blacklist so it should fail 117 // The video was not added to the blacklist so it should fail
118 const path = basePath + server.video.id 118 const path = basePath + server.video.id + '/blacklist'
119 119
120 await request(server.url) 120 await request(server.url)
121 .delete(path) 121 .delete(path)
@@ -126,7 +126,7 @@ describe('Test video blacklist API validators', function () {
126 }) 126 })
127 127
128 describe('When listing videos in blacklist', function () { 128 describe('When listing videos in blacklist', function () {
129 const basePath = '/api/v1/blacklist/' 129 const basePath = '/api/v1/videos/blacklist/'
130 130
131 it('Should fail with a non authenticated user', async function () { 131 it('Should fail with a non authenticated user', async function () {
132 const path = basePath 132 const path = basePath
diff --git a/server/tests/utils/video-blacklist.ts b/server/tests/utils/video-blacklist.ts
index 5729d13d8..3a499f46a 100644
--- a/server/tests/utils/video-blacklist.ts
+++ b/server/tests/utils/video-blacklist.ts
@@ -11,7 +11,7 @@ function addVideoToBlacklist (url: string, token: string, videoId: number, speci
11} 11}
12 12
13function removeVideoFromBlacklist (url: string, token: string, videoId: number, specialStatus = 204) { 13function removeVideoFromBlacklist (url: string, token: string, videoId: number, specialStatus = 204) {
14 const path = '/api/v1/blacklist/' + videoId 14 const path = '/api/v1/videos/' + videoId + '/blacklist'
15 15
16 return request(url) 16 return request(url)
17 .delete(path) 17 .delete(path)
@@ -21,7 +21,7 @@ function removeVideoFromBlacklist (url: string, token: string, videoId: number,
21} 21}
22 22
23function getBlacklistedVideosList (url: string, token: string, specialStatus = 200) { 23function getBlacklistedVideosList (url: string, token: string, specialStatus = 200) {
24 const path = '/api/v1/blacklist/' 24 const path = '/api/v1/videos/blacklist/'
25 25
26 return request(url) 26 return request(url)
27 .get(path) 27 .get(path)
@@ -33,7 +33,7 @@ function getBlacklistedVideosList (url: string, token: string, specialStatus = 2
33} 33}
34 34
35function getSortedBlacklistedVideosList (url: string, token: string, sort: string, specialStatus = 200) { 35function getSortedBlacklistedVideosList (url: string, token: string, sort: string, specialStatus = 200) {
36 const path = '/api/v1/blacklist/' 36 const path = '/api/v1/videos/blacklist/'
37 37
38 return request(url) 38 return request(url)
39 .get(path) 39 .get(path)