1 import * as request from 'supertest'
3 function reportVideoAbuse (url: string, token: string, videoId: number, reason: string, specialStatus = 204) {
4 const path = '/api/v1/videos/' + videoId + '/abuse'
8 .set('Accept', 'application/json')
9 .set('Authorization', 'Bearer ' + token)
11 .expect(specialStatus)
14 function getVideoAbusesList (url: string, token: string) {
15 const path = '/api/v1/videos/abuse'
19 .query({ sort: 'createdAt' })
20 .set('Accept', 'application/json')
21 .set('Authorization', 'Bearer ' + token)
23 .expect('Content-Type', /json/)
26 // ---------------------------------------------------------------------------