]> BookStack Code Mirror - bookstack/blobdiff - tests/Api/ApiDocsTest.php
Opensearch: Fixed XML declaration when php short tags enabled
[bookstack] / tests / Api / ApiDocsTest.php
index 062adce5376821a8b1914b734039c107edf6fa2b..a1603e0ef8274d244835c75e12a076045cb31ad5 100644 (file)
@@ -8,7 +8,13 @@ class ApiDocsTest extends TestCase
 {
     use TestsApi;
 
-    protected $endpoint = '/api/docs';
+    protected string $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()
     {