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

Server: Bulk update videos support field

This commit is contained in:
Chocobozzz 2019-05-31 16:30:11 +02:00
parent 9977c12838
commit 7d14d4d2ca
No known key found for this signature in database
GPG key ID: 583A612D890159BE
11 changed files with 154 additions and 32 deletions

View file

@ -24,6 +24,7 @@ import {
checkBadStartPagination
} from '../../../../shared/extra-utils/requests/check-api-params'
import { join } from 'path'
import { VideoChannelUpdate } from '../../../../shared/models/videos'
const expect = chai.expect
@ -169,9 +170,11 @@ describe('Test video channels API validator', function () {
})
describe('When updating a video channel', function () {
const baseCorrectParams = {
const baseCorrectParams: VideoChannelUpdate = {
displayName: 'hello',
description: 'super description'
description: 'super description',
support: 'toto',
bulkVideosSupportUpdate: false
}
let path: string
@ -214,6 +217,11 @@ describe('Test video channels API validator', function () {
await makePutBodyRequest({ url: server.url, path, token: server.accessToken, fields })
})
it('Should fail with a bad bulkVideosSupportUpdate field', async function () {
const fields = immutableAssign(baseCorrectParams, { bulkVideosSupportUpdate: 'super' })
await makePutBodyRequest({ url: server.url, path, token: server.accessToken, fields })
})
it('Should succeed with the correct parameters', async function () {
await makePutBodyRequest({
url: server.url,