summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-11-04 17:13:06 +0100
committerGitHub <noreply@github.com>2022-11-04 17:13:06 +0100
commit4127f33f4edfbee5d4b4e24f40a7d1d10907f889 (patch)
treed656c935e1737e85a22d25e03572c89d6c7a8075 /tests
parentde6012d1001c54b8fed2f9b5f379ef7baca74703 (diff)
parent9151960af0ed421bb729b62a16cfb0cbb0d7f730 (diff)
downloadnextcloud-server-4127f33f4edfbee5d4b4e24f40a7d1d10907f889.tar.gz
nextcloud-server-4127f33f4edfbee5d4b4e24f40a7d1d10907f889.zip
Merge pull request #34946 from nextcloud/backport/34804/stable25
[stable25] Skip general login with email for non-valid addresses and LDAP
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Authentication/Login/EmailLoginCommandTest.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/lib/Authentication/Login/EmailLoginCommandTest.php b/tests/lib/Authentication/Login/EmailLoginCommandTest.php
index 9de372148b9..0e70c40a1df 100644
--- a/tests/lib/Authentication/Login/EmailLoginCommandTest.php
+++ b/tests/lib/Authentication/Login/EmailLoginCommandTest.php
@@ -55,7 +55,7 @@ class EmailLoginCommandTest extends ALoginCommandTest {
public function testProcessNotAnEmailLogin() {
$data = $this->getFailedLoginData();
- $this->userManager->expects($this->once())
+ $this->userManager->expects($this->never())
->method('getByEmail')
->with($this->username)
->willReturn([]);
@@ -67,9 +67,10 @@ class EmailLoginCommandTest extends ALoginCommandTest {
public function testProcessDuplicateEmailLogin() {
$data = $this->getFailedLoginData();
+ $data->setUsername('user@example.com');
$this->userManager->expects($this->once())
->method('getByEmail')
- ->with($this->username)
+ ->with('user@example.com')
->willReturn([
$this->createMock(IUser::class),
$this->createMock(IUser::class),