aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/fixtures')
-rw-r--r--server/tests/fixtures/peertube-plugin-test-external-auth-one/main.js10
-rw-r--r--server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/main.js10
2 files changed, 18 insertions, 2 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test-external-auth-one/main.js b/server/tests/fixtures/peertube-plugin-test-external-auth-one/main.js
index 91c67e550..c65b8d3a8 100644
--- a/server/tests/fixtures/peertube-plugin-test-external-auth-one/main.js
+++ b/server/tests/fixtures/peertube-plugin-test-external-auth-one/main.js
@@ -1,6 +1,8 @@
1async function register ({ 1async function register ({
2 registerExternalAuth, 2 registerExternalAuth,
3 peertubeHelpers 3 peertubeHelpers,
4 settingsManager,
5 unregisterExternalAuth
4}) { 6}) {
5 { 7 {
6 const result = registerExternalAuth({ 8 const result = registerExternalAuth({
@@ -53,6 +55,12 @@ async function register ({
53 } 55 }
54 }) 56 })
55 } 57 }
58
59 settingsManager.onSettingsChange(settings => {
60 if (settings.disableKefka) {
61 unregisterExternalAuth('external-auth-2')
62 }
63 })
56} 64}
57 65
58async function unregister () { 66async function unregister () {
diff --git a/server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/main.js b/server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/main.js
index 9fc12a3e3..f58faa847 100644
--- a/server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/main.js
+++ b/server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/main.js
@@ -1,6 +1,8 @@
1async function register ({ 1async function register ({
2 registerIdAndPassAuth, 2 registerIdAndPassAuth,
3 peertubeHelpers 3 peertubeHelpers,
4 settingsManager,
5 unregisterIdAndPassAuth
4}) { 6}) {
5 registerIdAndPassAuth({ 7 registerIdAndPassAuth({
6 authName: 'spyro-auth', 8 authName: 'spyro-auth',
@@ -47,6 +49,12 @@ async function register ({
47 return null 49 return null
48 } 50 }
49 }) 51 })
52
53 settingsManager.onSettingsChange(settings => {
54 if (settings.disableSpyro) {
55 unregisterIdAndPassAuth('spyro-auth')
56 }
57 })
50} 58}
51 59
52async function unregister () { 60async function unregister () {