Update Admin tests for new auth implementation

This commit is contained in:
Jonny Barnes 2019-03-23 15:41:01 +00:00
parent 2e79492b01
commit dad45c4ab1
8 changed files with 136 additions and 91 deletions

View file

@ -3,13 +3,20 @@
namespace Tests\Feature\Admin;
use Tests\TestCase;
use App\Models\User;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class AdminHomeControllerTest extends TestCase
{
use DatabaseTransactions;
public function test_admin_homepage()
{
$response = $this->withSession(['loggedin' => true])
$user = factory(User::class)->create();
$response = $this->actingAs($user)
->get('/admin');
$response->assertViewIs('admin.welcome');
}
}