ServerInfo,
setAccessTokensToServers,
userLogin
-} from '../../utils'
-import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params'
+} from '../../../../shared/utils'
+import {
+ checkBadCountPagination,
+ checkBadSortPagination,
+ checkBadStartPagination
+} from '../../../../shared/utils/requests/check-api-params'
import { User } from '../../../../shared/models/users'
import { join } from 'path'
})
it('Should fail with a long description', async function () {
- const fields = immutableAssign(baseCorrectParams, { description: 'super'.repeat(150) })
+ const fields = immutableAssign(baseCorrectParams, { description: 'super'.repeat(201) })
await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields })
})
it('Should fail with a long support text', async function () {
- const fields = immutableAssign(baseCorrectParams, { support: 'super'.repeat(150) })
+ const fields = immutableAssign(baseCorrectParams, { support: 'super'.repeat(201) })
await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields })
})
statusCodeExpected: 200
})
})
+
+ it('Should fail when adding a channel with the same username', async function () {
+ await makePostBodyRequest({
+ url: server.url,
+ path: videoChannelPath,
+ token: server.accessToken,
+ fields: baseCorrectParams,
+ statusCodeExpected: 409
+ })
+ })
})
describe('When updating a video channel', function () {
})
it('Should fail with a long description', async function () {
- const fields = immutableAssign(baseCorrectParams, { description: 'super'.repeat(150) })
+ const fields = immutableAssign(baseCorrectParams, { description: 'super'.repeat(201) })
await makePutBodyRequest({ url: server.url, path, token: server.accessToken, fields })
})
it('Should fail with a long support text', async function () {
- const fields = immutableAssign(baseCorrectParams, { support: 'super'.repeat(150) })
+ const fields = immutableAssign(baseCorrectParams, { support: 'super'.repeat(201) })
await makePutBodyRequest({ url: server.url, path, token: server.accessToken, fields })
})