Created
March 24, 2019 20:58
-
-
Save duncanmcclean/7722e6434a61c1cb4ecaffd09dc1e435 to your computer and use it in GitHub Desktop.
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
<?php | |
namespace Tests\Feature; | |
use Tests\TestCase; | |
use Illuminate\Foundation\Testing\WithFaker; | |
use Illuminate\Foundation\Testing\RefreshDatabase; | |
class LoginTest extends TestCase | |
{ | |
use RefreshDatabase; | |
public function testLogin() | |
{ | |
$user = factory(\App\User::class)->create(); | |
$response = $this->post('/login', [ | |
'email' => $user->email, | |
'password' => 'secret' | |
]); | |
$response->assertStatus(302) | |
->assertRedirect('/articles'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment