aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/users.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params/users.ts')
-rw-r--r--server/tests/api/check-params/users.ts13
1 files changed, 7 insertions, 6 deletions
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts
index 5d5af284c..f448bb2a6 100644
--- a/server/tests/api/check-params/users.ts
+++ b/server/tests/api/check-params/users.ts
@@ -1,4 +1,4 @@
1/* tslint:disable:no-unused-expression */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import { omit } from 'lodash' 3import { omit } from 'lodash'
4import 'mocha' 4import 'mocha'
@@ -50,6 +50,7 @@ describe('Test users API validators', function () {
50 let serverWithRegistrationDisabled: ServerInfo 50 let serverWithRegistrationDisabled: ServerInfo
51 let userAccessToken = '' 51 let userAccessToken = ''
52 let moderatorAccessToken = '' 52 let moderatorAccessToken = ''
53 // eslint-disable-next-line @typescript-eslint/no-unused-vars
53 let channelId: number 54 let channelId: number
54 55
55 // --------------------------------------------------------------- 56 // ---------------------------------------------------------------
@@ -120,7 +121,7 @@ describe('Test users API validators', function () {
120 121
121 { 122 {
122 const res = await getMyUserInformation(server.url, server.accessToken) 123 const res = await getMyUserInformation(server.url, server.accessToken)
123 channelId = res.body.videoChannels[ 0 ].id 124 channelId = res.body.videoChannels[0].id
124 } 125 }
125 126
126 { 127 {
@@ -529,7 +530,7 @@ describe('Test users API validators', function () {
529 it('Should fail without an incorrect input file', async function () { 530 it('Should fail without an incorrect input file', async function () {
530 const fields = {} 531 const fields = {}
531 const attaches = { 532 const attaches = {
532 'avatarfile': join(__dirname, '..', '..', 'fixtures', 'video_short.mp4') 533 avatarfile: join(__dirname, '..', '..', 'fixtures', 'video_short.mp4')
533 } 534 }
534 await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches }) 535 await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches })
535 }) 536 })
@@ -537,7 +538,7 @@ describe('Test users API validators', function () {
537 it('Should fail with a big file', async function () { 538 it('Should fail with a big file', async function () {
538 const fields = {} 539 const fields = {}
539 const attaches = { 540 const attaches = {
540 'avatarfile': join(__dirname, '..', '..', 'fixtures', 'avatar-big.png') 541 avatarfile: join(__dirname, '..', '..', 'fixtures', 'avatar-big.png')
541 } 542 }
542 await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches }) 543 await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches })
543 }) 544 })
@@ -545,7 +546,7 @@ describe('Test users API validators', function () {
545 it('Should fail with an unauthenticated user', async function () { 546 it('Should fail with an unauthenticated user', async function () {
546 const fields = {} 547 const fields = {}
547 const attaches = { 548 const attaches = {
548 'avatarfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png') 549 avatarfile: join(__dirname, '..', '..', 'fixtures', 'avatar.png')
549 } 550 }
550 await makeUploadRequest({ 551 await makeUploadRequest({
551 url: server.url, 552 url: server.url,
@@ -559,7 +560,7 @@ describe('Test users API validators', function () {
559 it('Should succeed with the correct params', async function () { 560 it('Should succeed with the correct params', async function () {
560 const fields = {} 561 const fields = {}
561 const attaches = { 562 const attaches = {
562 'avatarfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png') 563 avatarfile: join(__dirname, '..', '..', 'fixtures', 'avatar.png')
563 } 564 }
564 await makeUploadRequest({ 565 await makeUploadRequest({
565 url: server.url, 566 url: server.url,