aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-27 11:42:01 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-05-04 16:21:39 +0200
commit98813e69bccc568eff771cfcaf907ccdd82ce3f1 (patch)
tree07a381fe910cf15cb22d0de6ff93cc7fd5ee0ce1 /server/tests/plugins
parent829b794a8542b55bdfff481fa7c3593bc88cb696 (diff)
downloadPeerTube-98813e69bccc568eff771cfcaf907ccdd82ce3f1.tar.gz
PeerTube-98813e69bccc568eff771cfcaf907ccdd82ce3f1.tar.zst
PeerTube-98813e69bccc568eff771cfcaf907ccdd82ce3f1.zip
Check auth plugin result
Diffstat (limited to 'server/tests/plugins')
-rw-r--r--server/tests/plugins/id-and-pass-auth.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/tests/plugins/id-and-pass-auth.ts b/server/tests/plugins/id-and-pass-auth.ts
index caf65b55f..c6382435d 100644
--- a/server/tests/plugins/id-and-pass-auth.ts
+++ b/server/tests/plugins/id-and-pass-auth.ts
@@ -151,6 +151,20 @@ describe('Test id and pass auth plugins', function () {
151 await getMyUserInformation(server.url, lagunaAccessToken, 401) 151 await getMyUserInformation(server.url, lagunaAccessToken, 401)
152 }) 152 })
153 153
154 it('Should reject an invalid username, email, role or display name', async function () {
155 await userLogin(server, { username: 'ward', password: 'ward password' }, 400)
156 await waitUntilLog(server, 'valid username')
157
158 await userLogin(server, { username: 'kiros', password: 'kiros password' }, 400)
159 await waitUntilLog(server, 'valid display name')
160
161 await userLogin(server, { username: 'raine', password: 'raine password' }, 400)
162 await waitUntilLog(server, 'valid role')
163
164 await userLogin(server, { username: 'ellone', password: 'elonne password' }, 400)
165 await waitUntilLog(server, 'valid email')
166 })
167
154 it('Should uninstall the plugin one and do not login existing Crash', async function () { 168 it('Should uninstall the plugin one and do not login existing Crash', async function () {
155 await uninstallPlugin({ 169 await uninstallPlugin({
156 url: server.url, 170 url: server.url,