vito/tests/Feature/LogsTest.php
Saeed Vaziry c66c50835a fix tests
2024-03-27 13:32:25 +01:00

27 lines
551 B
PHP

<?php
namespace Tests\Feature;
use App\Models\ServerLog;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class LogsTest extends TestCase
{
use RefreshDatabase;
public function test_see_logs()
{
$this->actingAs($this->user);
/** @var ServerLog $log */
$log = ServerLog::factory()->create([
'server_id' => $this->server->id,
]);
$this->get(route('servers.logs', $this->server))
->assertSuccessful()
->assertSeeText($log->type);
}
}