@@ -13,8 +13,9 @@ beforeEach(function () {
|
||||
$this->withoutVite();
|
||||
});
|
||||
|
||||
test('anonymous visitors enter the real dashboard without creating an authenticated identity', function () {
|
||||
$this->get('/')->assertRedirect('/dashboard');
|
||||
test('anonymous visitors enter through login and can still consult public screens without an identity', function () {
|
||||
$this->get('/')->assertRedirect('/login');
|
||||
$this->get('/apresentacao')->assertOk()->assertInertia(fn (Assert $p) => $p->component('home')->where('auth.user', null)->missing('company')->missing('stats'));
|
||||
$this->get('/dashboard')->assertInertia(fn (Assert $p) => $p->component('dashboard')->where('auth.user', null)->where('company', null)->where('stats.total', 0)->where('publicNavigation.dataScope', 'none'));
|
||||
$this->assertGuest('web');
|
||||
expect(User::query()->count())->toBe(0);
|
||||
|
||||
Reference in New Issue
Block a user