]> BookStack Code Mirror - bookstack/blobdiff - tests/Auth/UserInviteTest.php
Framework: Addressed deprecations
[bookstack] / tests / Auth / UserInviteTest.php
index 7488ac776d43798c8f50a79064ae98e09e1d6d56..a9dee0007f5870e25a6cc65391d3f8eeb02347ac 100644 (file)
@@ -2,8 +2,8 @@
 
 namespace Tests\Auth;
 
+use BookStack\Access\Notifications\UserInviteNotification;
 use BookStack\Access\UserInviteService;
-use BookStack\Notifications\UserInvite;
 use BookStack\Users\Models\User;
 use Carbon\Carbon;
 use Illuminate\Notifications\Messages\MailMessage;
@@ -29,7 +29,7 @@ class UserInviteTest extends TestCase
 
         $newUser = User::query()->where('email', '=', $email)->orderBy('id', 'desc')->first();
 
-        Notification::assertSentTo($newUser, UserInvite::class);
+        Notification::assertSentTo($newUser, UserInviteNotification::class);
         $this->assertDatabaseHas('user_invites', [
             'user_id' => $newUser->id,
         ]);
@@ -50,11 +50,11 @@ class UserInviteTest extends TestCase
         $resp->assertRedirect('/settings/users');
 
         $newUser = User::query()->where('email', '=', $email)->orderBy('id', 'desc')->first();
-        Notification::assertSentTo($newUser, UserInvite::class, function ($notification, $channels, $notifiable) {
+        Notification::assertSentTo($newUser, UserInviteNotification::class, function ($notification, $channels, $notifiable) {
             /** @var MailMessage $mail */
             $mail = $notification->toMail($notifiable);
 
-            return 'Sie wurden eingeladen BookStack beizutreten!' === $mail->subject &&
+            return 'Sie wurden eingeladen, BookStack beizutreten!' === $mail->subject &&
                 'Ein Konto wurde für Sie auf BookStack erstellt.' === $mail->greeting;
         });
     }