+ statusCodeExpected: HttpStatusCode.CONFLICT_409
+ })
+ })
+
+ it('Should forbid to import torrent videos', async function () {
+ await updateCustomSubConfig(server.url, server.accessToken, {
+ import: {
+ videos: {
+ http: {
+ enabled: true
+ },
+ torrent: {
+ enabled: false
+ }
+ }
+ }
+ })
+
+ let fields = omit(baseCorrectParams, 'targetUrl')
+ fields = immutableAssign(fields, { magnetUri: getMagnetURI() })
+
+ await makePostBodyRequest({
+ url: server.url,
+ path,
+ token: server.accessToken,
+ fields,
+ statusCodeExpected: HttpStatusCode.CONFLICT_409
+ })
+
+ fields = omit(fields, 'magnetUri')
+ const attaches = {
+ torrentfile: join(__dirname, '..', '..', 'fixtures', 'video-720p.torrent')
+ }
+
+ await makeUploadRequest({
+ url: server.url,
+ path,
+ token: server.accessToken,
+ fields,
+ attaches,
+ statusCodeExpected: HttpStatusCode.CONFLICT_409