18 lines
482 B
PHP
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');
|
|
});
|