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:
parent
9977c12838
commit
7d14d4d2ca
11 changed files with 154 additions and 32 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue