Sistema de controles da União de Ciclistas do Brasil
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 

34 lines
760 B

<?php
namespace Tests\Feature\Auth;
use App\Associate;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Auth;
use Tests\TestCase;
class LogoutTest extends TestCase
{
use RefreshDatabase;
/** @test */
public function an_authenticated_associate_can_log_out()
{
$associate = factory(Associate::class)->create();
$this->be($associate);
$this->post(route('logout'))
->assertRedirect(route('home'));
$this->assertFalse(Auth::check());
}
/** @test */
public function an_unauthenticated_associate_can_not_log_out()
{
$this->post(route('logout'))
->assertRedirect(route('login'));
$this->assertFalse(Auth::check());
}
}