feat: remove horizon
This commit is contained in:
@@ -18,33 +18,14 @@ it('allows only administrators through production tooling gates', function (): v
|
||||
'role' => UserRole::USER,
|
||||
]);
|
||||
|
||||
expect(Gate::forUser($admin)->allows('viewHorizon'))->toBeTrue()
|
||||
->and(Gate::forUser($admin)->allows('viewApiDocs'))->toBeTrue()
|
||||
->and(Gate::forUser($moderator)->allows('viewHorizon'))->toBeFalse()
|
||||
expect(Gate::forUser($admin)->allows('viewApiDocs'))->toBeTrue()
|
||||
->and(Gate::forUser($moderator)->allows('viewApiDocs'))->toBeFalse()
|
||||
->and(Gate::forUser($user)->allows('viewHorizon'))->toBeFalse()
|
||||
->and(Gate::forUser($user)->allows('viewApiDocs'))->toBeFalse()
|
||||
->and(Gate::allows('viewHorizon'))->toBeFalse()
|
||||
->and(Gate::allows('viewApiDocs'))->toBeFalse();
|
||||
});
|
||||
|
||||
it('protects the horizon dashboard outside local environments', function (): void {
|
||||
$admin = User::factory()->create([
|
||||
'role' => UserRole::ADMIN,
|
||||
]);
|
||||
$moderator = User::factory()->create([
|
||||
'role' => UserRole::MODERATOR,
|
||||
]);
|
||||
|
||||
$this->get('/horizon')->assertForbidden();
|
||||
|
||||
$this->actingAs($moderator)
|
||||
->get('/horizon')
|
||||
->assertForbidden();
|
||||
|
||||
$this->actingAs($admin)
|
||||
->get('/horizon')
|
||||
->assertSuccessful();
|
||||
it('does not expose a queue dashboard', function (): void {
|
||||
$this->get('/horizon')->assertNotFound();
|
||||
});
|
||||
|
||||
it('protects the scramble documentation outside local environments', function (): void {
|
||||
|
||||
Reference in New Issue
Block a user