Files
AFC-Demo/tests/Feature/CompanySearchTest.php
T
2025-10-17 09:20:35 +02:00

18 lines
482 B
PHP

<?php
use App\Models\User;
test('guests are redirected to the login page', function () {
$response = $this->get(route('company-search'));
$response->assertRedirect(route('login'));
});
test('authenticated users can visit the company search page', function () {
$user = User::factory()->create();
$this->actingAs($user);
$response = $this->get(route('company-search'));
$response->assertSuccessful();
$response->assertSee('Unternehmensauskunft');
});