X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/6eadf3efb3c460cc450b0c8b67220a5d00125ff7..refs/pull/3593/head:/tests/Auth/UserInviteTest.php diff --git a/tests/Auth/UserInviteTest.php b/tests/Auth/UserInviteTest.php index 5b9b14e60..38124cc1a 100644 --- a/tests/Auth/UserInviteTest.php +++ b/tests/Auth/UserInviteTest.php @@ -21,8 +21,8 @@ class UserInviteTest extends TestCase $email = Str::random(16) . '@example.com'; $resp = $this->actingAs($admin)->post('/settings/users/create', [ - 'name' => 'Barry', - 'email' => $email, + 'name' => 'Barry', + 'email' => $email, 'send_invite' => 'true', ]); $resp->assertRedirect('/settings/users'); @@ -42,12 +42,10 @@ class UserInviteTest extends TestCase $email = Str::random(16) . '@example.com'; $resp = $this->actingAs($admin)->post('/settings/users/create', [ - 'name' => 'Barry', - 'email' => $email, + 'name' => 'Barry', + 'email' => $email, 'send_invite' => 'true', - 'setting' => [ - 'language' => 'de', - ] + 'language' => 'de', ]); $resp->assertRedirect('/settings/users'); @@ -55,6 +53,7 @@ class UserInviteTest extends TestCase Notification::assertSentTo($newUser, UserInvite::class, function ($notification, $channels, $notifiable) { /** @var MailMessage $mail */ $mail = $notification->toMail($notifiable); + return 'Du wurdest eingeladen BookStack beizutreten!' === $mail->subject && 'Ein Konto wurde für Sie auf BookStack erstellt.' === $mail->greeting; }); @@ -80,7 +79,7 @@ class UserInviteTest extends TestCase ]); $setPasswordResp->assertSee('Password set, you should now be able to login using your set password to access BookStack!'); $newPasswordValid = auth()->validate([ - 'email' => $user->email, + 'email' => $user->email, 'password' => 'my test password', ]); $this->assertTrue($newPasswordValid);