From c5d31dba56d669c0df0209761c43c5a6ac7cec4a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 28 Dec 2017 13:59:22 +0100 Subject: Tests directories refractor --- server/tests/utils/video-abuses.ts | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 server/tests/utils/video-abuses.ts (limited to 'server/tests/utils/video-abuses.ts') diff --git a/server/tests/utils/video-abuses.ts b/server/tests/utils/video-abuses.ts deleted file mode 100644 index f00809234..000000000 --- a/server/tests/utils/video-abuses.ts +++ /dev/null @@ -1,31 +0,0 @@ -import * as request from 'supertest' - -function reportVideoAbuse (url: string, token: string, videoId: number, reason: string, specialStatus = 204) { - const path = '/api/v1/videos/' + videoId + '/abuse' - - return request(url) - .post(path) - .set('Accept', 'application/json') - .set('Authorization', 'Bearer ' + token) - .send({ reason }) - .expect(specialStatus) -} - -function getVideoAbusesList (url: string, token: string) { - const path = '/api/v1/videos/abuse' - - return request(url) - .get(path) - .query({ sort: 'createdAt' }) - .set('Accept', 'application/json') - .set('Authorization', 'Bearer ' + token) - .expect(200) - .expect('Content-Type', /json/) -} - -// --------------------------------------------------------------------------- - -export { - reportVideoAbuse, - getVideoAbusesList -} -- cgit v1.2.3