aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-03 17:04:47 +0100
committerChocobozzz <me@florianbigard.com>2021-12-03 17:04:47 +0100
commit0bc53e20296de68288481e2375b297626087174b (patch)
treea5d45a622932ee3539369dfeb9a84889176fd6f5 /server/tests
parentd1a233d8d86ead1e3aa2350d5480eab3336b17d6 (diff)
downloadPeerTube-0bc53e20296de68288481e2375b297626087174b.tar.gz
PeerTube-0bc53e20296de68288481e2375b297626087174b.tar.zst
PeerTube-0bc53e20296de68288481e2375b297626087174b.zip
Add ability to redirect users on external auth
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/check-params/config.ts12
-rw-r--r--server/tests/api/server/config.ts18
2 files changed, 30 insertions, 0 deletions
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts
index d0cd7722b..a6e87730a 100644
--- a/server/tests/api/check-params/config.ts
+++ b/server/tests/api/check-params/config.ts
@@ -54,6 +54,18 @@ describe('Test config API validators', function () {
54 whitelisted: true 54 whitelisted: true
55 } 55 }
56 }, 56 },
57 client: {
58 videos: {
59 miniature: {
60 preferAuthorDisplayName: false
61 }
62 },
63 menu: {
64 login: {
65 redirectOnSingleExternalAuth: false
66 }
67 }
68 },
57 cache: { 69 cache: {
58 previews: { 70 previews: {
59 size: 2 71 size: 2
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts
index ea524723c..96ec17b0f 100644
--- a/server/tests/api/server/config.ts
+++ b/server/tests/api/server/config.ts
@@ -43,6 +43,9 @@ function checkInitialConfig (server: PeerTubeServer, data: CustomConfig) {
43 expect(data.services.twitter.username).to.equal('@Chocobozzz') 43 expect(data.services.twitter.username).to.equal('@Chocobozzz')
44 expect(data.services.twitter.whitelisted).to.be.false 44 expect(data.services.twitter.whitelisted).to.be.false
45 45
46 expect(data.client.videos.miniature.preferAuthorDisplayName).to.be.false
47 expect(data.client.menu.login.redirectOnSingleExternalAuth).to.be.false
48
46 expect(data.cache.previews.size).to.equal(1) 49 expect(data.cache.previews.size).to.equal(1)
47 expect(data.cache.captions.size).to.equal(1) 50 expect(data.cache.captions.size).to.equal(1)
48 expect(data.cache.torrents.size).to.equal(1) 51 expect(data.cache.torrents.size).to.equal(1)
@@ -138,6 +141,9 @@ function checkUpdatedConfig (data: CustomConfig) {
138 expect(data.services.twitter.username).to.equal('@Kuja') 141 expect(data.services.twitter.username).to.equal('@Kuja')
139 expect(data.services.twitter.whitelisted).to.be.true 142 expect(data.services.twitter.whitelisted).to.be.true
140 143
144 expect(data.client.videos.miniature.preferAuthorDisplayName).to.be.true
145 expect(data.client.menu.login.redirectOnSingleExternalAuth).to.be.true
146
141 expect(data.cache.previews.size).to.equal(2) 147 expect(data.cache.previews.size).to.equal(2)
142 expect(data.cache.captions.size).to.equal(3) 148 expect(data.cache.captions.size).to.equal(3)
143 expect(data.cache.torrents.size).to.equal(4) 149 expect(data.cache.torrents.size).to.equal(4)
@@ -246,6 +252,18 @@ const newCustomConfig: CustomConfig = {
246 whitelisted: true 252 whitelisted: true
247 } 253 }
248 }, 254 },
255 client: {
256 videos: {
257 miniature: {
258 preferAuthorDisplayName: true
259 }
260 },
261 menu: {
262 login: {
263 redirectOnSingleExternalAuth: true
264 }
265 }
266 },
249 cache: { 267 cache: {
250 previews: { 268 previews: {
251 size: 2 269 size: 2