})
describe('When removing a video in blacklist', function () {
- const basePath = '/api/v1/blacklist/'
+ const basePath = '/api/v1/videos/'
it('Should fail with a non authenticated user', async function () {
- const path = basePath + server.video.id
+ const path = basePath + server.video.id + '/blacklist'
await request(server.url)
.delete(path)
})
it('Should fail with a non admin user', async function () {
- const path = basePath + server.video.id
+ const path = basePath + server.video.id + '/blacklist'
await request(server.url)
.delete(path)
})
it('Should fail with an incorrect id', async function () {
- const path = basePath + 'foobar'
+ const path = basePath + 'foobar/blacklist'
await request(server.url)
.delete(path)
it('Should fail with a not blacklisted video', async function () {
// The video was not added to the blacklist so it should fail
- const path = basePath + server.video.id
+ const path = basePath + server.video.id + '/blacklist'
await request(server.url)
.delete(path)
})
describe('When listing videos in blacklist', function () {
- const basePath = '/api/v1/blacklist/'
+ const basePath = '/api/v1/videos/blacklist/'
it('Should fail with a non authenticated user', async function () {
const path = basePath