27 lines
643 B
PHP
27 lines
643 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class ExampleTest extends TestCase
|
|
{
|
|
use RefreshDatabase;
|
|
|
|
/**
|
|
* A basic test example.
|
|
*/
|
|
public function test_the_application_returns_a_successful_response(): void
|
|
{
|
|
$response = $this->actingAs(User::factory()->create(['is_admin' => true]))->get('/dashboard');
|
|
|
|
$response->assertStatus(200)
|
|
->assertSee('Admin dashboard')
|
|
->assertSee('Stock health')
|
|
->assertSee('Issued by department')
|
|
->assertSee('Recent activity');
|
|
}
|
|
}
|