aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/users/users.ts14
1 files changed, 12 insertions, 2 deletions
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts
index cd928b980..62a59033f 100644
--- a/server/tests/api/users/users.ts
+++ b/server/tests/api/users/users.ts
@@ -716,11 +716,12 @@ describe('Test users', function () {
716 emailVerified: true, 716 emailVerified: true,
717 videoQuota: 42, 717 videoQuota: 42,
718 role: UserRole.MODERATOR, 718 role: UserRole.MODERATOR,
719 adminFlags: UserAdminFlag.NONE 719 adminFlags: UserAdminFlag.NONE,
720 pluginAuth: 'toto'
720 }) 721 })
721 722
722 const res = await getUserInformation(server.url, accessToken, userId) 723 const res = await getUserInformation(server.url, accessToken, userId)
723 const user = res.body 724 const user = res.body as User
724 725
725 expect(user.username).to.equal('user_1') 726 expect(user.username).to.equal('user_1')
726 expect(user.email).to.equal('updated2@example.com') 727 expect(user.email).to.equal('updated2@example.com')
@@ -730,6 +731,15 @@ describe('Test users', function () {
730 expect(user.roleLabel).to.equal('Moderator') 731 expect(user.roleLabel).to.equal('Moderator')
731 expect(user.id).to.be.a('number') 732 expect(user.id).to.be.a('number')
732 expect(user.adminFlags).to.equal(UserAdminFlag.NONE) 733 expect(user.adminFlags).to.equal(UserAdminFlag.NONE)
734 expect(user.pluginAuth).to.equal('toto')
735 })
736
737 it('Should reset the auth plugin', async function () {
738 await updateUser({ url: server.url, userId, accessToken, pluginAuth: null })
739
740 const res = await getUserInformation(server.url, accessToken, userId)
741 const user = res.body as User
742 expect(user.pluginAuth).to.be.null
733 }) 743 })
734 744
735 it('Should have removed the user token', async function () { 745 it('Should have removed the user token', async function () {