aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users/users.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/users/users.ts')
-rw-r--r--server/tests/api/users/users.ts19
1 files changed, 18 insertions, 1 deletions
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts
index 6fc2a070f..3a3fabb4c 100644
--- a/server/tests/api/users/users.ts
+++ b/server/tests/api/users/users.ts
@@ -18,7 +18,7 @@ import {
18 getUsersList, 18 getUsersList,
19 getUsersListPaginationAndSort, 19 getUsersListPaginationAndSort,
20 getVideoChannel, 20 getVideoChannel,
21 getVideosList, 21 getVideosList, installPlugin,
22 login, 22 login,
23 makePutBodyRequest, 23 makePutBodyRequest,
24 rateVideo, 24 rateVideo,
@@ -57,6 +57,8 @@ describe('Test users', function () {
57 server = await flushAndRunServer(1) 57 server = await flushAndRunServer(1)
58 58
59 await setAccessTokensToServers([ server ]) 59 await setAccessTokensToServers([ server ])
60
61 await installPlugin({ url: server.url, accessToken: server.accessToken, npmName: 'peertube-theme-background-red' })
60 }) 62 })
61 63
62 describe('OAuth client', function () { 64 describe('OAuth client', function () {
@@ -551,6 +553,21 @@ describe('Test users', function () {
551 expect(user.account.displayName).to.equal('new display name') 553 expect(user.account.displayName).to.equal('new display name')
552 expect(user.account.description).to.equal('my super description updated') 554 expect(user.account.description).to.equal('my super description updated')
553 }) 555 })
556
557 it('Should be able to update my theme', async function () {
558 for (const theme of [ 'background-red', 'default', 'instance-default' ]) {
559 await updateMyUser({
560 url: server.url,
561 accessToken: accessTokenUser,
562 theme
563 })
564
565 const res = await getMyUserInformation(server.url, accessTokenUser)
566 const body: User = res.body
567
568 expect(body.theme).to.equal(theme)
569 }
570 })
554 }) 571 })
555 572
556 describe('Updating another user', function () { 573 describe('Updating another user', function () {