await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
})
+ it('Should fail with a "peertube" username', async function () {
+ const fields = immutableAssign(baseCorrectParams, { username: 'peertube' })
+
+ await makePostBodyRequest({
+ url: server.url,
+ path,
+ token: server.accessToken,
+ fields,
+ statusCodeExpected: 409
+ })
+ })
+
it('Should succeed with the correct params', async function () {
await makePostBodyRequest({
url: server.url,
it('Should fail without an incorrect input file', async function () {
const fields = {}
const attaches = {
- 'avatarfile': join(__dirname, '..', 'fixtures', 'video_short.mp4')
+ 'avatarfile': join(__dirname, '..', '..', 'fixtures', 'video_short.mp4')
}
await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches })
})
it('Should fail with a big file', async function () {
const fields = {}
const attaches = {
- 'avatarfile': join(__dirname, '..', 'fixtures', 'avatar-big.png')
+ 'avatarfile': join(__dirname, '..', '..', 'fixtures', 'avatar-big.png')
}
await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches })
})
it('Should succeed with the correct params', async function () {
const fields = {}
const attaches = {
- 'avatarfile': join(__dirname, '..', 'fixtures', 'avatar.png')
+ 'avatarfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png')
}
await makeUploadRequest({
url: server.url,
})
})
+ it('Should fail with a "peertube" username', async function () {
+ const fields = immutableAssign(baseCorrectParams, { username: 'peertube' })
+
+ await makePostBodyRequest({
+ url: server.url,
+ path: registrationPath,
+ token: server.accessToken,
+ fields,
+ statusCodeExpected: 409
+ })
+ })
+
it('Should fail if we register a user with the same email', async function () {
const fields = immutableAssign(baseCorrectParams, { email: 'admin1@example.com' })