diff options
author | Chocobozzz <me@florianbigard.com> | 2020-05-20 10:04:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-05-20 10:17:27 +0200 |
commit | 9a7fd9600bf513adffbf2127be7c3a8b4d31073f (patch) | |
tree | a2ac8e321f57f5c7add15ec8166a6a2e7bdf989a /server/tests/plugins | |
parent | 51539e95d954867d5c4561ac56843105253db79c (diff) | |
download | PeerTube-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')
-rw-r--r-- | server/tests/plugins/external-auth.ts | 10 |
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 | ||