added tests for diets

This commit is contained in:
2024-01-10 17:11:50 +03:00
parent d96954f4b4
commit fef7f4e2bc
8 changed files with 509 additions and 39 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace Tests\Feature\Diet;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class IndexTest extends TestCase
{
use RefreshDatabase;
protected User $user;
public function setUp(): void
{
$this->refreshApplicationWithLocale('en');
$this->user = User::factory()->create(['is_consultant' => true]);
}
public function test_index_page_success(): void
{
$response = $this
->actingAs($this->user)
->get(route('plan.index'));
$response
->assertOk();
}
}