aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-19 10:37:35 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-07-24 10:58:16 +0200
commit9b474844e85cce916370693cc24f53339a695570 (patch)
tree10b1148a7581a2754e336a144c085a05ce72a1db /server/tests/api/users
parent32fe00138990627749da58ff9f845584013aa219 (diff)
downloadPeerTube-9b474844e85cce916370693cc24f53339a695570.tar.gz
PeerTube-9b474844e85cce916370693cc24f53339a695570.tar.zst
PeerTube-9b474844e85cce916370693cc24f53339a695570.zip
Add CLI plugins tests
Diffstat (limited to 'server/tests/api/users')
-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 () {