aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/video-blacklist.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-28 17:30:59 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-06-29 14:56:35 +0200
commitd4a8e7a65f97bb3257facc13e1ae8ffdbad61ddb (patch)
treea4cb07318100031951c3dffc61f4f2cb95d2cbd0 /server/tests/api/check-params/video-blacklist.ts
parent62ddc31a9e4b92d7d27898ccfc363f68ab044139 (diff)
downloadPeerTube-d4a8e7a65f97bb3257facc13e1ae8ffdbad61ddb.tar.gz
PeerTube-d4a8e7a65f97bb3257facc13e1ae8ffdbad61ddb.tar.zst
PeerTube-d4a8e7a65f97bb3257facc13e1ae8ffdbad61ddb.zip
Support short uuid for GET video/playlist
Diffstat (limited to 'server/tests/api/check-params/video-blacklist.ts')
-rw-r--r--server/tests/api/check-params/video-blacklist.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/server/tests/api/check-params/video-blacklist.ts b/server/tests/api/check-params/video-blacklist.ts
index 3d4837d58..ce7f5fa17 100644
--- a/server/tests/api/check-params/video-blacklist.ts
+++ b/server/tests/api/check-params/video-blacklist.ts
@@ -191,7 +191,7 @@ describe('Test video blacklist API validators', function () {
191 }) 191 })
192 192
193 it('Should succeed with the correct params', async function () { 193 it('Should succeed with the correct params', async function () {
194 const path = basePath + servers[0].video.uuid + '/blacklist' 194 const path = basePath + servers[0].video.shortUUID + '/blacklist'
195 const fields = { reason: 'hello' } 195 const fields = { reason: 'hello' }
196 196
197 await makePutBodyRequest({ 197 await makePutBodyRequest({
@@ -222,10 +222,14 @@ describe('Test video blacklist API validators', function () {
222 }) 222 })
223 223
224 it('Should succeed with an admin', async function () { 224 it('Should succeed with an admin', async function () {
225 const res = await getVideoWithToken(servers[0].url, servers[0].accessToken, servers[0].video.uuid, HttpStatusCode.OK_200) 225 const video = servers[0].video
226 const video: VideoDetails = res.body
227 226
228 expect(video.blacklisted).to.be.true 227 for (const id of [ video.id, video.uuid, video.shortUUID ]) {
228 const res = await getVideoWithToken(servers[0].url, servers[0].accessToken, id, HttpStatusCode.OK_200)
229 const video: VideoDetails = res.body
230
231 expect(video.blacklisted).to.be.true
232 }
229 }) 233 })
230 }) 234 })
231 235