+ it('Should fail with an invalid videoLanguages attribute', async function () {
+ {
+ const fields = {
+ videoLanguages: 'toto'
+ }
+
+ await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
+ }
+
+ {
+ const languages = []
+ for (let i = 0; i < 1000; i++) {
+ languages.push('fr')
+ }
+
+ const fields = {
+ videoLanguages: languages
+ }
+
+ await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
+ }
+ })
+
+ it('Should fail with an invalid theme', async function () {
+ const fields = { theme: 'invalid' }
+ await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
+ })
+
+ it('Should fail with an unknown theme', async function () {
+ const fields = { theme: 'peertube-theme-unknown' }
+ await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
+ })
+
+ it('Should fail with an invalid noInstanceConfigWarningModal attribute', async function () {
+ const fields = {
+ noInstanceConfigWarningModal: -1
+ }
+
+ await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
+ })
+
+ it('Should fail with an invalid noWelcomeModal attribute', async function () {
+ const fields = {
+ noWelcomeModal: -1
+ }
+
+ await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
+ })
+