X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fplugins%2Fid-and-pass-auth.ts;h=cbba638c2bab3788fbe39509fe9f8f21155cd916;hb=8bb71f2e332726c207318e44b95e784f9740dc40;hp=97df4c1fd50c2d25536f3b761b89a7e9a10ae2bf;hpb=e5c86ba7c2fe5421b0d75943b03282e3f52de270;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/plugins/id-and-pass-auth.ts b/server/tests/plugins/id-and-pass-auth.ts index 97df4c1fd..cbba638c2 100644 --- a/server/tests/plugins/id-and-pass-auth.ts +++ b/server/tests/plugins/id-and-pass-auth.ts @@ -12,7 +12,7 @@ import { updateMyUser, userLogin, wait, - login, refreshToken, getConfig, updatePluginSettings + login, refreshToken, getConfig, updatePluginSettings, getUsersList } from '../../../shared/extra-utils' import { User, UserRole, ServerConfig } from '@shared/models' import { expect } from 'chai' @@ -225,6 +225,20 @@ describe('Test id and pass auth plugins', function () { expect(crashAuth).to.not.exist }) + it('Should display plugin auth information in users list', async function () { + const res = await getUsersList(server.url, server.accessToken) + + const users: User[] = res.body.data + + const root = users.find(u => u.username === 'root') + const crash = users.find(u => u.username === 'crash') + const laguna = users.find(u => u.username === 'laguna') + + expect(root.pluginAuth).to.be.null + expect(crash.pluginAuth).to.equal('peertube-plugin-test-id-pass-auth-one') + expect(laguna.pluginAuth).to.equal('peertube-plugin-test-id-pass-auth-two') + }) + after(async function () { await cleanupTests([ server ]) })