mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-06-11 14:50:30 +00:00
7510946f38
- 📚 Added "API Dokumentation" link to the sidebar and header navigation. - 🔓 Defined `viewApiDocs` gate for public access to API documentation. - ✅ Added feature tests for API documentation route accessibility and OpenAPI document serving.
16 lines
437 B
PHP
16 lines
437 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Gate;
|
|
|
|
it('exposes the api docs route publicly', function () {
|
|
expect(Gate::forUser(null)->allows('viewApiDocs'))->toBeTrue();
|
|
});
|
|
|
|
it('allows guests to open the api documentation', function () {
|
|
$this->get(route('scramble.docs.ui'))->assertSuccessful();
|
|
});
|
|
|
|
it('serves the openapi document to guests', function () {
|
|
$this->get(route('scramble.docs.document'))->assertSuccessful();
|
|
});
|