aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/tests/utils/video-blacklists.ts
blob: 6812d3ad4d9285dff364560c0cbd04a0233c8b8d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                                                 
import * as request from 'supertest'

function addVideoToBlacklist (url: string, token: string, videoId: number, specialStatus = 204) {
  const path = '/api/v1/videos/' + videoId + '/blacklist'

  return request(url)
          .post(path)
          .set('Accept', 'application/json')
          .set('Authorization', 'Bearer ' + token)
          .expect(specialStatus)
}

// ---------------------------------------------------------------------------

export {
  addVideoToBlacklist
}