Files
eatvio-infra/tests/Feature/BlogPost/IndexTest.php
2024-01-10 13:41:43 +03:00

34 lines
656 B
PHP

<?php
namespace Tests\Feature\Plan;
use App\Models\Plan;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
use App\Models\BlogPost;
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('blog_post.index'));
$response
->assertOk();
}
}