]> BookStack Code Mirror - bookstack/blobdiff - tests/Auth/UserInviteTest.php
Added language list favourites sorting, updated styles
[bookstack] / tests / Auth / UserInviteTest.php
index 5b9b14e60a904626bb0f0a4f935e5e337f954be7..38124cc1aef4ca64de5a2878d6dd0935acab9c3c 100644 (file)
@@ -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);