Notification::assertSentTo($newUser, UserInvite::class);
$this->assertDatabaseHas('user_invites', [
Notification::assertSentTo($newUser, UserInvite::class);
$this->assertDatabaseHas('user_invites', [
$setPasswordResp = $this->followingRedirects()->post('/register/invite/' . $token, [
'password' => 'my test password',
]);
$setPasswordResp = $this->followingRedirects()->post('/register/invite/' . $token, [
'password' => 'my test password',
]);
- 'email' => $user->email,
- 'password' => 'my test password'
+ 'email' => $user->email,
+ 'password' => 'my test password',
]);
$this->assertTrue($newPasswordValid);
$this->assertDatabaseMissing('user_invites', [
]);
$this->assertTrue($newPasswordValid);
$this->assertDatabaseMissing('user_invites', [
$noPassword->assertSee('The password field is required.');
$this->assertDatabaseHas('user_invites', [
$noPassword->assertSee('The password field is required.');
$this->assertDatabaseHas('user_invites', [
$setPasswordPageResp->assertRedirect('/password/email');
$setPasswordPageResp->assertSessionHas('error', 'This invitation link has expired. You can instead try to reset your account password.');
}
$setPasswordPageResp->assertRedirect('/password/email');
$setPasswordPageResp->assertSessionHas('error', 'This invitation link has expired. You can instead try to reset your account password.');
}