18 lines
483 B
PHP
18 lines
483 B
PHP
<?php
|
|
|
|
use App\Models\User;
|
|
|
|
$tabs = ['dashboard', 'cloud', 'users', 'backups', 'invoices', 'support'];
|
|
|
|
it('redirects guests from portal tabs to login', function (string $tab) {
|
|
$this->get(route($tab))->assertRedirect('/login');
|
|
})->with($tabs);
|
|
|
|
it('renders portal tabs for authenticated users', function (string $tab) {
|
|
$user = User::factory()->create();
|
|
|
|
$this->actingAs($user)->get(route($tab))
|
|
->assertOk()
|
|
->assertSee('CluPilot');
|
|
})->with($tabs);
|