7 class ApiDocsTest extends TestCase
11 protected $endpoint = '/api/docs';
13 public function test_docs_page_returns_view_with_docs_content()
15 $resp = $this->actingAsApiEditor()->get($this->endpoint);
16 $resp->assertStatus(200);
17 $resp->assertSee(url('/api/docs.json'));
18 $resp->assertSee('Show a JSON view of the API docs data.');
19 $resp->assertHeader('Content-Type', 'text/html; charset=UTF-8');
22 public function test_docs_json_endpoint_returns_json()
24 $resp = $this->actingAsApiEditor()->get($this->endpoint . '.json');
25 $resp->assertStatus(200);
26 $resp->assertHeader('Content-Type', 'application/json');
29 'name' => 'docs-display',