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 1
1
<?php
2
2
3
3
use App \Models \User ;
4
+ use Composer \InstalledVersions ;
4
5
5
6
use function Pest \Laravel \actingAs ;
6
7
28
29
test ('password is not confirmed with invalid password ' , function () {
29
30
actingAs (User::factory ()->create ());
30
31
32
+ // @TODO: The following check is only required to handle starter-kit without 2 factor authentication.
33
+ $ usesTwoFactorAuthentication = InstalledVersions::isInstalled ('laravel/fortify ' );
34
+
31
35
visit (route ('password.confirm ' ))
32
36
->fill ('password ' , 'wrong-password ' )
33
37
->press ('@confirm-password-button ' )
34
38
->assertUrlIs (route ('password.confirm ' ))
35
- ->assertSee ('The provided password is incorrect. ' )
39
+ ->assertSee ($ usesTwoFactorAuthentication ? ' The provided password was incorrect. ' : 'The provided password is incorrect. ' )
36
40
->assertNoConsoleLogs ()
37
41
->assertNoJavaScriptErrors ();
38
42
});
You can’t perform that action at this time.
0 commit comments