Update Admin tests for new auth implementation
This commit is contained in:
parent
2e79492b01
commit
dad45c4ab1
8 changed files with 136 additions and 91 deletions
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue