PeerTube/server/tests/utils/video-blacklists.ts

18 lines
484 B
TypeScript
Raw Normal View History

2017-09-04 14:21:47 -05:00
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
}