-function searchVideoWithToken (url: string, search: string, token: string) {
- const path = '/api/v1/videos'
- const req = request(url)
- .get(path + '/search')
- .set('Authorization', 'Bearer ' + token)
- .query({ search })
- .set('Accept', 'application/json')
-
- return req.expect(200)
- .expect('Content-Type', /json/)
-}
-
-function searchVideoWithPagination (url: string, search: string, start: number, count: number, sort?: string) {
- const path = '/api/v1/videos'
-
- const req = request(url)
- .get(path + '/search')
- .query({ start })
- .query({ search })
- .query({ count })
-
- if (sort) req.query({ sort })
-
- return req.set('Accept', 'application/json')
- .expect(200)
- .expect('Content-Type', /json/)
-}
-
-function searchVideoWithSort (url: string, search: string, sort: string) {
+function removeVideo (url: string, token: string, id: number | string, expectedStatus = 204) {