mirror of
https://github.com/vitodeploy/vito.git
synced 2025-06-30 21:46:16 +00:00
fix notification chanels and more tests (#108)
* fix notification chanels and more tests * fix code style
This commit is contained in:
30
tests/Feature/LogsTest.php
Normal file
30
tests/Feature/LogsTest.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Http\Livewire\ServerLogs\LogsList;
|
||||
use App\Models\ServerLog;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Livewire\Livewire;
|
||||
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))
|
||||
->assertOk();
|
||||
|
||||
Livewire::test(LogsList::class, ['server' => $this->server])
|
||||
->assertSeeText($log->type);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user