diff options
Diffstat (limited to 'server/tests/api/check-params/video-imports.ts')
-rw-r--r-- | server/tests/api/check-params/video-imports.ts | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/server/tests/api/check-params/video-imports.ts b/server/tests/api/check-params/video-imports.ts index 3759e47c4..f954ba089 100644 --- a/server/tests/api/check-params/video-imports.ts +++ b/server/tests/api/check-params/video-imports.ts | |||
@@ -1,9 +1,8 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import { omit } from 'lodash' | ||
4 | import 'mocha' | 3 | import 'mocha' |
4 | import { omit } from 'lodash' | ||
5 | import { join } from 'path' | 5 | import { join } from 'path' |
6 | import { VideoPrivacy } from '../../../../shared/models/videos/video-privacy.enum' | ||
7 | import { | 6 | import { |
8 | cleanupTests, | 7 | cleanupTests, |
9 | createUser, | 8 | createUser, |
@@ -23,7 +22,8 @@ import { | |||
23 | checkBadSortPagination, | 22 | checkBadSortPagination, |
24 | checkBadStartPagination | 23 | checkBadStartPagination |
25 | } from '../../../../shared/extra-utils/requests/check-api-params' | 24 | } from '../../../../shared/extra-utils/requests/check-api-params' |
26 | import { getMagnetURI, getYoutubeVideoUrl } from '../../../../shared/extra-utils/videos/video-imports' | 25 | import { getMagnetURI, getGoodVideoUrl } from '../../../../shared/extra-utils/videos/video-imports' |
26 | import { VideoPrivacy } from '../../../../shared/models/videos/video-privacy.enum' | ||
27 | 27 | ||
28 | describe('Test video imports API validator', function () { | 28 | describe('Test video imports API validator', function () { |
29 | const path = '/api/v1/videos/imports' | 29 | const path = '/api/v1/videos/imports' |
@@ -76,7 +76,7 @@ describe('Test video imports API validator', function () { | |||
76 | 76 | ||
77 | before(function () { | 77 | before(function () { |
78 | baseCorrectParams = { | 78 | baseCorrectParams = { |
79 | targetUrl: getYoutubeVideoUrl(), | 79 | targetUrl: getGoodVideoUrl(), |
80 | name: 'my super name', | 80 | name: 'my super name', |
81 | category: 5, | 81 | category: 5, |
82 | licence: 1, | 82 | licence: 1, |
@@ -246,15 +246,13 @@ describe('Test video imports API validator', function () { | |||
246 | it('Should succeed with the correct parameters', async function () { | 246 | it('Should succeed with the correct parameters', async function () { |
247 | this.timeout(30000) | 247 | this.timeout(30000) |
248 | 248 | ||
249 | { | 249 | await makePostBodyRequest({ |
250 | await makePostBodyRequest({ | 250 | url: server.url, |
251 | url: server.url, | 251 | path, |
252 | path, | 252 | token: server.accessToken, |
253 | token: server.accessToken, | 253 | fields: baseCorrectParams, |
254 | fields: baseCorrectParams, | 254 | statusCodeExpected: 200 |
255 | statusCodeExpected: 200 | 255 | }) |
256 | }) | ||
257 | } | ||
258 | }) | 256 | }) |
259 | 257 | ||
260 | it('Should forbid to import http videos', async function () { | 258 | it('Should forbid to import http videos', async function () { |