->where('path', '.*$');
// API docs routes
+ Route::redirect('/api', '/api/docs');
Route::get('/api/docs', [Api\ApiDocsController::class, 'display']);
Route::get('/pages/recently-updated', [PageController::class, 'showRecentlyUpdated']);
protected $endpoint = '/api/docs';
+ public function test_api_endpoint_redirects_to_docs()
+ {
+ $resp = $this->actingAsApiEditor()->get('/api');
+ $resp->assertRedirect('api/docs');
+ }
+
public function test_docs_page_returns_view_with_docs_content()
{
$resp = $this->actingAsApiEditor()->get($this->endpoint);