aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins/external-auth.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-05-20 10:04:44 +0200
committerChocobozzz <me@florianbigard.com>2020-05-20 10:17:27 +0200
commit9a7fd9600bf513adffbf2127be7c3a8b4d31073f (patch)
treea2ac8e321f57f5c7add15ec8166a6a2e7bdf989a /server/tests/plugins/external-auth.ts
parent51539e95d954867d5c4561ac56843105253db79c (diff)
downloadPeerTube-9a7fd9600bf513adffbf2127be7c3a8b4d31073f.tar.gz
PeerTube-9a7fd9600bf513adffbf2127be7c3a8b4d31073f.tar.zst
PeerTube-9a7fd9600bf513adffbf2127be7c3a8b4d31073f.zip
Fix external auth email/password update
Also check if an actor does not already exist when creating the user
Diffstat (limited to 'server/tests/plugins/external-auth.ts')
-rw-r--r--server/tests/plugins/external-auth.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/tests/plugins/external-auth.ts b/server/tests/plugins/external-auth.ts
index a85672782..57361be05 100644
--- a/server/tests/plugins/external-auth.ts
+++ b/server/tests/plugins/external-auth.ts
@@ -255,6 +255,16 @@ describe('Test external auth plugins', function () {
255 expect(body.role).to.equal(UserRole.USER) 255 expect(body.role).to.equal(UserRole.USER)
256 }) 256 })
257 257
258 it('Should not update an external auth email', async function () {
259 await updateMyUser({
260 url: server.url,
261 accessToken: cyanAccessToken,
262 email: 'toto@example.com',
263 currentPassword: 'toto',
264 statusCodeExpected: 400
265 })
266 })
267
258 it('Should reject token of Kefka by the plugin hook', async function () { 268 it('Should reject token of Kefka by the plugin hook', async function () {
259 this.timeout(10000) 269 this.timeout(10000)
260 270