X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fexternal-plugins%2Fauth-ldap.ts;h=d51d337be77cad6bde42cd86cefcdccda645ecf8;hb=HEAD;hp=326453a5f2cb0b189c5a1da3d2637b3dac8b5da8;hpb=bf54587a3e2ad9c2c186828f2a5682b91ee2cc00;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/external-plugins/auth-ldap.ts b/server/tests/external-plugins/auth-ldap.ts index 326453a5f..d51d337be 100644 --- a/server/tests/external-plugins/auth-ldap.ts +++ b/server/tests/external-plugins/auth-ldap.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' import { HttpStatusCode } from '@shared/models' @@ -33,7 +32,7 @@ describe('Official plugin auth-ldap', function () { 'mail-property': 'mail', 'search-base': 'ou=people,dc=planetexpress,dc=com', 'search-filter': '(|(mail={{username}})(uid={{username}}))', - 'url': 'ldap://localhost:390', + 'url': 'ldap://127.0.0.1:390', 'username-property': 'uid' } }) @@ -51,7 +50,7 @@ describe('Official plugin auth-ldap', function () { 'mail-property': 'mail', 'search-base': 'ou=people,dc=planetexpress,dc=com', 'search-filter': '(|(mail={{username}})(uid={{username}}))', - 'url': 'ldap://localhost:10389', + 'url': 'ldap://127.0.0.1:10389', 'username-property': 'uid' } }) @@ -95,6 +94,14 @@ describe('Official plugin auth-ldap', function () { await server.login.login({ user: { username: 'fry@planetexpress.com', password: 'fry' } }) }) + it('Should not be able to ask password reset', async function () { + await server.users.askResetPassword({ email: 'fry@planetexpress.com', expectedStatus: HttpStatusCode.CONFLICT_409 }) + }) + + it('Should not be able to ask email verification', async function () { + await server.users.askSendVerifyEmail({ email: 'fry@planetexpress.com', expectedStatus: HttpStatusCode.CONFLICT_409 }) + }) + it('Should not login if the plugin is uninstalled', async function () { await server.plugins.uninstall({ npmName: 'peertube-plugin-auth-ldap' })