use BookStack\Notifications\ConfirmEmail;
use Illuminate\Support\Facades\Notification;
-class AuthTest extends TestCase
+class AuthTest extends BrowserKitTest
{
public function test_auth_working()
public function test_reset_password_flow()
{
+
+ Notification::fake();
+
$this->visit('/login')->click('Forgot Password?')
->seePageIs('/password/email')
]);
+
+ Notification::assertSentTo($user, \BookStack\Notifications\ResetPassword::class);
+ $n = Notification::sent($user, \BookStack\Notifications\ResetPassword::class);
+
$reset = DB::table('password_resets')->where('email', '=', '
[email protected]')->first();
- $this->visit('/password/reset/' . $reset->token)
+ $this->visit('/password/reset/' . $n->first()->token)
->see('Reset Password')
->submitForm('Reset Password', [