+ public function test_reset_password_flow()
+ {
+
+ Notification::fake();
+
+ $this->visit('/login')->click('Forgot Password?')
+ ->seePageIs('/password/email')
+ ->press('Send Reset Link')
+
+ $this->seeInDatabase('password_resets', [
+ ]);
+
+
+ Notification::assertSentTo($user, \BookStack\Notifications\ResetPassword::class);
+ $n = Notification::sent($user, \BookStack\Notifications\ResetPassword::class);
+
+ $this->visit('/password/reset/' . $n->first()->token)
+ ->see('Reset Password')
+ ->submitForm('Reset Password', [
+ 'password' => 'randompass',
+ 'password_confirmation' => 'randompass'
+ ])->seePageIs('/')
+ ->see('Your password has been successfully reset');
+ }
+
+ public function test_reset_password_page_shows_sign_links()
+ {
+ $this->setSettings(['registration-enabled' => 'true']);
+ $this->visit('/password/email')
+ ->seeLink('Log in')
+ ->seeLink('Sign up');
+ }
+