Skip to content

Instantly share code, notes, and snippets.

@DCzajkowski
Created May 22, 2018 20:49
Show Gist options
  • Save DCzajkowski/24e6fc94e7dfacdb603930079a8e2a9e to your computer and use it in GitHub Desktop.
Save DCzajkowski/24e6fc94e7dfacdb603930079a8e2a9e to your computer and use it in GitHub Desktop.
<?php
namespace Tests\Feature\Auth;
use App\User;
use Tests\TestCase;
use Illuminate\Support\Facades\Notification;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ForgotPasswordTest extends TestCase
{
// ...
public function test_user_receives_an_email_with_a_password_reset_link()
{
Notification::fake();
$user = factory(User::class)->create();
$response = $this->post('/password/email', [
'email' => $user->email,
]);
// assertions go here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment