- public function test_delete_endpoint()
- {
- $this->actingAsApiEditor();
- $page = Page::visible()->first();
- $resp = $this->deleteJson($this->baseEndpoint . "/{$page->id}");
-
- $resp->assertStatus(204);
- $this->assertActivityExists('page_delete', $page);
- }
-
- public function test_export_html_endpoint()
- {
- $this->actingAsApiEditor();
- $page = Page::visible()->first();
-
- $resp = $this->get($this->baseEndpoint . "/{$page->id}/export/html");
- $resp->assertStatus(200);
- $resp->assertSee($page->name);
- $resp->assertHeader('Content-Disposition', 'attachment; filename="' . $page->slug . '.html"');
- }
-
- public function test_export_plain_text_endpoint()
- {
- $this->actingAsApiEditor();
- $page = Page::visible()->first();
-
- $resp = $this->get($this->baseEndpoint . "/{$page->id}/export/plaintext");
- $resp->assertStatus(200);
- $resp->assertSee($page->name);
- $resp->assertHeader('Content-Disposition', 'attachment; filename="' . $page->slug . '.txt"');
- }
-
- public function test_export_pdf_endpoint()