You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
878 B
30 lines
878 B
<?php
|
|
|
|
namespace Tests\Feature\Auth;
|
|
|
|
use App\Entities\Users\User;
|
|
use Tests\TestCase;
|
|
|
|
class ResetPasswordTest extends TestCase
|
|
{
|
|
/** @test */
|
|
public function user_can_reset_password_by_their_email()
|
|
{
|
|
// $user = factory(User::class)->create();
|
|
$user1 = factory(User::class)->create(['email' => 'testing@app.dev']);
|
|
|
|
// Reset Request
|
|
$this->visit('password/reset');
|
|
$this->notSeeInDatabase('password_resets', [
|
|
'email' => 'testing@app.dev'
|
|
]);
|
|
$this->see(trans('auth.reset_password'));
|
|
$this->type('testing@app.dev', 'email');
|
|
$this->press(trans('auth.send_reset_password_link'));
|
|
$this->seePageIs('password/reset');
|
|
$this->see(trans('passwords.sent'));
|
|
$this->seeInDatabase('password_resets', [
|
|
'email' => 'testing@app.dev'
|
|
]);
|
|
}
|
|
}
|