1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Introduce server commands

This commit is contained in:
Chocobozzz 2021-07-13 09:43:59 +02:00
parent 0d8ecb7592
commit 6c5065a011
No known key found for this signature in database
GPG key ID: 583A612D890159BE
63 changed files with 688 additions and 708 deletions

View file

@ -2,25 +2,21 @@
import 'mocha'
import { io } from 'socket.io-client'
import { HttpStatusCode } from '@shared/core-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination,
cleanupTests,
flushAndRunServer,
immutableAssign,
makeGetRequest,
makePostBodyRequest,
makePutBodyRequest,
ServerInfo,
setAccessTokensToServers,
wait
} from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
} from '../../../../shared/extra-utils/requests/check-api-params'
import { UserNotificationSetting, UserNotificationSettingValue } from '../../../../shared/models/users'
import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
} from '@shared/extra-utils'
import { UserNotificationSetting, UserNotificationSettingValue } from '@shared/models'
describe('Test user notifications API validators', function () {
let server: ServerInfo
@ -193,7 +189,7 @@ describe('Test user notifications API validators', function () {
it('Should fail with incorrect field values', async function () {
{
const fields = immutableAssign(correctFields, { newCommentOnMyVideo: 15 })
const fields = { ...correctFields, newCommentOnMyVideo: 15 }
await makePutBodyRequest({
url: server.url,
@ -205,7 +201,7 @@ describe('Test user notifications API validators', function () {
}
{
const fields = immutableAssign(correctFields, { newCommentOnMyVideo: 'toto' })
const fields = { ...correctFields, newCommentOnMyVideo: 'toto' }
await makePutBodyRequest({
url: server.url,