pgsql db connection and testing route added
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use Livewire\Volt\Volt;
|
||||
|
||||
test('guests are redirected to the login page', function () {
|
||||
$response = $this->get(route('company-search'));
|
||||
@@ -8,10 +9,25 @@ test('guests are redirected to the login page', function () {
|
||||
});
|
||||
|
||||
test('authenticated users can visit the company search page', function () {
|
||||
$user = User::factory()->create();
|
||||
$this->actingAs($user);
|
||||
$this->actingAs(User::factory()->create());
|
||||
|
||||
$this->get(route('company-search'))->assertOk();
|
||||
});
|
||||
|
||||
test('company search page displays correctly', function () {
|
||||
$this->actingAs(User::factory()->create());
|
||||
|
||||
$response = $this->get(route('company-search'));
|
||||
$response->assertSuccessful();
|
||||
|
||||
$response->assertSee('Unternehmensauskunft');
|
||||
$response->assertSee('Suchen Sie nach Unternehmensinformationen');
|
||||
});
|
||||
|
||||
test('search input is wired to component', function () {
|
||||
$this->actingAs(User::factory()->create());
|
||||
|
||||
Volt::test('company-search')
|
||||
->assertSet('search', '')
|
||||
->set('search', 'Test Firma')
|
||||
->assertSet('search', 'Test Firma');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user