X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fexternal-plugins%2Fauth-ldap.ts;h=d51d337be77cad6bde42cd86cefcdccda645ecf8;hb=HEAD;hp=acec69df59e455f9a36d3859b53aee2f8ed2b9dc;hpb=9e8789497377cac5554a622da605f5b89587aa9c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/external-plugins/auth-ldap.ts b/server/tests/external-plugins/auth-ldap.ts index acec69df5..d51d337be 100644 --- a/server/tests/external-plugins/auth-ldap.ts +++ b/server/tests/external-plugins/auth-ldap.ts @@ -1,8 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' -import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' +import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' import { HttpStatusCode } from '@shared/models' describe('Official plugin auth-ldap', function () { @@ -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' })