/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
-import { omit } from 'lodash'
import 'mocha'
+import { omit } from 'lodash'
import { join } from 'path'
-import { VideoPrivacy } from '../../../../shared/models/videos/video-privacy.enum'
import {
cleanupTests,
createUser,
checkBadSortPagination,
checkBadStartPagination
} from '../../../../shared/extra-utils/requests/check-api-params'
-import { getMagnetURI, getYoutubeVideoUrl } from '../../../../shared/extra-utils/videos/video-imports'
+import { getMagnetURI, getGoodVideoUrl } from '../../../../shared/extra-utils/videos/video-imports'
+import { VideoPrivacy } from '../../../../shared/models/videos/video-privacy.enum'
describe('Test video imports API validator', function () {
const path = '/api/v1/videos/imports'
before(function () {
baseCorrectParams = {
- targetUrl: getYoutubeVideoUrl(),
+ targetUrl: getGoodVideoUrl(),
name: 'my super name',
category: 5,
licence: 1,
it('Should succeed with the correct parameters', async function () {
this.timeout(30000)
- {
- await makePostBodyRequest({
- url: server.url,
- path,
- token: server.accessToken,
- fields: baseCorrectParams,
- statusCodeExpected: 200
- })
- }
+ await makePostBodyRequest({
+ url: server.url,
+ path,
+ token: server.accessToken,
+ fields: baseCorrectParams,
+ statusCodeExpected: 200
+ })
})
it('Should forbid to import http videos', async function () {