generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from dissto/add-password-reset-test
Add render reset password page test
- Loading branch information
Showing
5 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace CodeWithDennis\FilamentTests\Stubs\Pages\Auth\PasswordReset; | ||
|
||
use CodeWithDennis\FilamentTests\Stubs\Base; | ||
|
||
class Render extends Base | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return 'can render the reset password page'; | ||
} | ||
|
||
public function getShouldGenerate(): bool | ||
{ | ||
return $this->hasPasswordReset() | ||
&& $this->getRequestPasswordResetRouteAction(); | ||
} | ||
|
||
public function getVariables(): array | ||
{ | ||
return [ | ||
'RESET_PASSWORD_ROUTE_ACTION' => str($this->getRequestPasswordResetRouteAction())->prepend('\\'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
it({{ DESCRIPTION }}, function () { | ||
Auth::logout(); | ||
|
||
livewire({{ RESET_PASSWORD_ROUTE_ACTION }}::class) | ||
->assertSuccessful(); | ||
}){{ RESOLVED_GROUP_METHOD }}; |