+ describe('When getting blacklisted video', function () {
+
+ it('Should fail with a non authenticated user', async function () {
+ await getVideo(server.url, server.video.uuid, 401)
+ })
+
+ it('Should fail with another user', async function () {
+ await getVideoWithToken(server.url, userAccessToken2, server.video.uuid, 403)
+ })
+
+ it('Should succeed with the owner authenticated user', async function () {
+ const res = await getVideoWithToken(server.url, userAccessToken1, server.video.uuid, 200)
+ const video: VideoDetails = res.body
+
+ expect(video.blacklisted).to.be.true
+ })
+
+ it('Should succeed with an admin', async function () {
+ const res = await getVideoWithToken(server.url, server.accessToken, server.video.uuid, 200)
+ const video: VideoDetails = res.body
+
+ expect(video.blacklisted).to.be.true
+ })
+ })
+