1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Add auth plugin info in users list

This commit is contained in:
Chocobozzz 2020-05-05 09:44:53 +02:00
parent e5c86ba7c2
commit 8bb71f2e33
No known key found for this signature in database
GPG key ID: 583A612D890159BE
5 changed files with 31 additions and 2 deletions

View file

@ -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 ])
})