X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/4d4a57d1bfb1c57541d82eb7910a9754fe0fc8cf..refs/pull/3139/head:/tests/Auth/UserInviteTest.php diff --git a/tests/Auth/UserInviteTest.php b/tests/Auth/UserInviteTest.php index b6f521eaa..1e1235f33 100644 --- a/tests/Auth/UserInviteTest.php +++ b/tests/Auth/UserInviteTest.php @@ -1,18 +1,18 @@ -actingAs($admin)->post('/settings/users/create', [ - 'name' => 'Barry', - 'email' => $email, + 'name' => 'Barry', + 'email' => $email, 'send_invite' => 'true', ]); $resp->assertRedirect('/settings/users'); @@ -30,7 +30,7 @@ class UserInviteTest extends TestCase Notification::assertSentTo($newUser, UserInvite::class); $this->assertDatabaseHas('user_invites', [ - 'user_id' => $newUser->id + 'user_id' => $newUser->id, ]); } @@ -52,14 +52,14 @@ class UserInviteTest extends TestCase $setPasswordResp = $this->followingRedirects()->post('/register/invite/' . $token, [ 'password' => 'my test password', ]); - $setPasswordResp->assertSee('Password set, you now have access to BookStack!'); + $setPasswordResp->assertSee('Password set, you should now be able to login using your set password to access BookStack!'); $newPasswordValid = auth()->validate([ - 'email' => $user->email, - 'password' => 'my test password' + 'email' => $user->email, + 'password' => 'my test password', ]); $this->assertTrue($newPasswordValid); $this->assertDatabaseMissing('user_invites', [ - 'user_id' => $user->id + 'user_id' => $user->id, ]); } @@ -85,7 +85,7 @@ class UserInviteTest extends TestCase $noPassword->assertSee('The password field is required.'); $this->assertDatabaseHas('user_invites', [ - 'user_id' => $user->id + 'user_id' => $user->id, ]); } @@ -112,6 +112,4 @@ class UserInviteTest extends TestCase $setPasswordPageResp->assertRedirect('/password/email'); $setPasswordPageResp->assertSessionHas('error', 'This invitation link has expired. You can instead try to reset your account password.'); } - - -} \ No newline at end of file +}