1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

Notifications: Reorgranised classes into domain specific folders

Closes #4500
This commit is contained in:
Dan Brown
2023-09-11 19:26:28 +01:00
parent 18f396c21b
commit 8e3f8de627
15 changed files with 36 additions and 33 deletions

View File

@@ -2,7 +2,7 @@
namespace Tests\Auth;
use BookStack\Notifications\ResetPassword;
use BookStack\Access\Notifications\ResetPasswordNotification;
use BookStack\Users\Models\User;
use Illuminate\Support\Facades\Notification;
use Tests\TestCase;
@@ -34,8 +34,8 @@ class ResetPasswordTest extends TestCase
/** @var User $user */
$user = User::query()->where('email', '=', 'admin@admin.com')->first();
Notification::assertSentTo($user, ResetPassword::class);
$n = Notification::sent($user, ResetPassword::class);
Notification::assertSentTo($user, ResetPasswordNotification::class);
$n = Notification::sent($user, ResetPasswordNotification::class);
$this->get('/password/reset/' . $n->first()->token)
->assertOk()
@@ -95,7 +95,7 @@ class ResetPasswordTest extends TestCase
$resp = $this->followingRedirects()->post('/password/email', [
'email' => $editor->email,
]);
Notification::assertTimesSent(1, ResetPassword::class);
Notification::assertTimesSent(1, ResetPasswordNotification::class);
$resp->assertSee('A password reset link will be sent to ' . $editor->email . ' if that email address is found in the system.');
}
}