Files
eatvio-infra/tests/Feature/Diet/ShowTest.php
2024-01-10 17:11:50 +03:00

32 lines
637 B
PHP

<?php
namespace Tests\Feature\Diet;
use Tests\TestCase;
use App\Models\User;
use App\Models\Diet;
class ShowTest extends TestCase
{
protected User $user;
private Diet $diet;
public function setUp(): void
{
$this->refreshApplicationWithLocale('en');
$this->user = User::factory()->create(['is_consultant' => true]);
$this->diet = Diet::inRandomOrder()->first();
}
public function test_show_page_success(): void
{
$response = $this
->actingAs($this->user)
->get(route('diet.show', $this->diet));
$response
->assertOk();
}
}