diff options
Diffstat (limited to 'server/tests/utils')
-rw-r--r-- | server/tests/utils/videos/video-imports.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/server/tests/utils/videos/video-imports.ts b/server/tests/utils/videos/video-imports.ts index fa2f13b5e..59dfd481a 100644 --- a/server/tests/utils/videos/video-imports.ts +++ b/server/tests/utils/videos/video-imports.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { VideoImportCreate } from '../../../../shared/models/videos' | 1 | import { VideoImportCreate } from '../../../../shared/models/videos' |
2 | import { makeGetRequest, makePostBodyRequest, makeUploadRequest } from '..' | 2 | import { makeGetRequest, makeUploadRequest } from '..' |
3 | 3 | ||
4 | function getYoutubeVideoUrl () { | 4 | function getYoutubeVideoUrl () { |
5 | return 'https://youtu.be/msX3jv1XdvM' | 5 | return 'https://youtu.be/msX3jv1XdvM' |
@@ -7,7 +7,7 @@ function getYoutubeVideoUrl () { | |||
7 | 7 | ||
8 | function getMagnetURI () { | 8 | function getMagnetURI () { |
9 | // tslint:disable:max-line-length | 9 | // tslint:disable:max-line-length |
10 | return 'magnet:?xs=https%3A%2F%2Fpeertube2.cpy.re%2Fstatic%2Ftorrents%2F2b8dbe74-9548-4f6f-a8da-986aed9e5e45-240.torrent&xt=urn:btih:52bf3729e5859390a8751495196b5674a55c99f3&dn=60fps_small&tr=wss%3A%2F%2Fpeertube2.cpy.re%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fpeertube2.cpy.re%2Ftracker%2Fannounce&ws=https%3A%2F%2Fpeertube2.cpy.re%2Fstatic%2Fwebseed%2F2b8dbe74-9548-4f6f-a8da-986aed9e5e45-240.mp4' | 10 | return 'magnet:?xs=https%3A%2F%2Fpeertube2.cpy.re%2Fstatic%2Ftorrents%2Fb209ca00-c8bb-4b2b-b421-1ede169f3dbc-720.torrent&xt=urn:btih:0f498834733e8057ed5c6f2ee2b4efd8d84a76ee&dn=super+peertube2+video&tr=wss%3A%2F%2Fpeertube2.cpy.re%3A443%2Ftracker%2Fsocket&tr=https%3A%2F%2Fpeertube2.cpy.re%2Ftracker%2Fannounce&ws=https%3A%2F%2Fpeertube2.cpy.re%2Fstatic%2Fwebseed%2Fb209ca00-c8bb-4b2b-b421-1ede169f3dbc-720.mp4' |
11 | } | 11 | } |
12 | 12 | ||
13 | function importVideo (url: string, token: string, attributes: VideoImportCreate) { | 13 | function importVideo (url: string, token: string, attributes: VideoImportCreate) { |
@@ -26,11 +26,15 @@ function importVideo (url: string, token: string, attributes: VideoImportCreate) | |||
26 | }) | 26 | }) |
27 | } | 27 | } |
28 | 28 | ||
29 | function getMyVideoImports (url: string, token: string) { | 29 | function getMyVideoImports (url: string, token: string, sort?: string) { |
30 | const path = '/api/v1/users/me/videos/imports' | 30 | const path = '/api/v1/users/me/videos/imports' |
31 | 31 | ||
32 | const query = {} | ||
33 | if (sort) query['sort'] = sort | ||
34 | |||
32 | return makeGetRequest({ | 35 | return makeGetRequest({ |
33 | url, | 36 | url, |
37 | query, | ||
34 | path, | 38 | path, |
35 | token, | 39 | token, |
36 | statusCodeExpected: 200 | 40 | statusCodeExpected: 200 |