aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/users-admin.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params/users-admin.ts')
-rw-r--r--server/tests/api/check-params/users-admin.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/server/tests/api/check-params/users-admin.ts b/server/tests/api/check-params/users-admin.ts
index 716c22556..d941ca024 100644
--- a/server/tests/api/check-params/users-admin.ts
+++ b/server/tests/api/check-params/users-admin.ts
@@ -1,8 +1,7 @@
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
3import 'mocha'
4import { omit } from 'lodash'
5import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination, MockSmtpServer } from '@server/tests/shared' 3import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination, MockSmtpServer } from '@server/tests/shared'
4import { omit } from '@shared/core-utils'
6import { HttpStatusCode, UserAdminFlag, UserRole } from '@shared/models' 5import { HttpStatusCode, UserAdminFlag, UserRole } from '@shared/models'
7import { 6import {
8 cleanupTests, 7 cleanupTests,
@@ -123,7 +122,7 @@ describe('Test users admin API validators', function () {
123 }) 122 })
124 123
125 it('Should fail with a missing email', async function () { 124 it('Should fail with a missing email', async function () {
126 const fields = omit(baseCorrectParams, 'email') 125 const fields = omit(baseCorrectParams, [ 'email' ])
127 126
128 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields }) 127 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
129 }) 128 })
@@ -223,13 +222,13 @@ describe('Test users admin API validators', function () {
223 }) 222 })
224 223
225 it('Should fail without a videoQuota', async function () { 224 it('Should fail without a videoQuota', async function () {
226 const fields = omit(baseCorrectParams, 'videoQuota') 225 const fields = omit(baseCorrectParams, [ 'videoQuota' ])
227 226
228 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields }) 227 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
229 }) 228 })
230 229
231 it('Should fail without a videoQuotaDaily', async function () { 230 it('Should fail without a videoQuotaDaily', async function () {
232 const fields = omit(baseCorrectParams, 'videoQuotaDaily') 231 const fields = omit(baseCorrectParams, [ 'videoQuotaDaily' ])
233 232
234 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields }) 233 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
235 }) 234 })
@@ -247,7 +246,7 @@ describe('Test users admin API validators', function () {
247 }) 246 })
248 247
249 it('Should fail without a user role', async function () { 248 it('Should fail without a user role', async function () {
250 const fields = omit(baseCorrectParams, 'role') 249 const fields = omit(baseCorrectParams, [ 'role' ])
251 250
252 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields }) 251 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
253 }) 252 })