Fix notification tests

This commit is contained in:
Bubka 2024-04-26 11:55:28 +02:00
parent 6458501e51
commit be3aaf319c

View File

@ -84,6 +84,9 @@ public function test_login_send_new_device_notification()
{ {
Notification::fake(); Notification::fake();
$this->user['preferences->notifyOnNewAuthDevice'] = 1;
$this->user->save();
$this->json('POST', '/user/login', [ $this->json('POST', '/user/login', [
'email' => $this->user->email, 'email' => $this->user->email,
'password' => self::PASSWORD, 'password' => self::PASSWORD,
@ -235,6 +238,9 @@ public function test_login_with_invalid_credentials_send_failed_login_notificati
{ {
Notification::fake(); Notification::fake();
$this->user['preferences->notifyOnFailedLogin'] = 1;
$this->user->save();
$this->json('POST', '/user/login', [ $this->json('POST', '/user/login', [
'email' => $this->user->email, 'email' => $this->user->email,
'password' => self::WRONG_PASSWORD, 'password' => self::WRONG_PASSWORD,