Skip to content

Commit

Permalink
MNT Test failed login is logged correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Dec 20, 2023
1 parent 3b39fa0 commit 164f93f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/AuditHookTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,4 +333,14 @@ public function testRestoreToStage()
$this->assertStringContainsString('deleted Page', $message);
$this->assertStringContainsString('My page', $message);
}

public function testFailedLogin()
{
$member = $this->createMemberWithPermission('ADMIN');
$this->get('Security/login');
$this->submitForm('MemberLoginForm_LoginForm', null, ['Email' => $member->Email, 'Password' => 'clearly wrong password']);

$message = $this->writer->getLastMessage();
$this->assertStringContainsString('Failed login attempt using email "' . $member->Email . '"', $message);
}
}

0 comments on commit 164f93f

Please sign in to comment.