File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 11<?php
22
33use App \Models \User ;
4+ use Composer \InstalledVersions ;
45
56use function Pest \Laravel \actingAs ;
67
2829test ('password is not confirmed with invalid password ' , function () {
2930 actingAs (User::factory ()->create ());
3031
32+ // @TODO: The following check is only required to handle starter-kit without 2 factor authentication.
33+ $ usesTwoFactorAuthentication = InstalledVersions::isInstalled ('laravel/fortify ' );
34+
3135 visit (route ('password.confirm ' ))
3236 ->fill ('password ' , 'wrong-password ' )
3337 ->press ('@confirm-password-button ' )
3438 ->assertUrlIs (route ('password.confirm ' ))
35- ->assertSee ('The provided password is incorrect. ' )
39+ ->assertSee ($ usesTwoFactorAuthentication ? ' The provided password was incorrect. ' : 'The provided password is incorrect. ' )
3640 ->assertNoConsoleLogs ()
3741 ->assertNoJavaScriptErrors ();
3842});
You can’t perform that action at this time.
0 commit comments