X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/3625f12abe7c0cc052bd027af961d0214d6fcc7e..refs/pull/3593/head:/tests/Entity/PageRevisionTest.php diff --git a/tests/Entity/PageRevisionTest.php b/tests/Entity/PageRevisionTest.php index fc6678788..cc4900249 100644 --- a/tests/Entity/PageRevisionTest.php +++ b/tests/Entity/PageRevisionTest.php @@ -203,4 +203,19 @@ class PageRevisionTest extends TestCase $revisionCount = $page->revisions()->count(); $this->assertEquals(12, $revisionCount); } + + public function test_revision_list_shows_editor_type() + { + /** @var Page $page */ + $page = Page::first(); + $this->asAdmin()->put($page->getUrl(), ['name' => 'Updated page', 'html' => 'new page html']); + + $resp = $this->get($page->refresh()->getUrl('/revisions')); + $this->withHtml($resp)->assertElementContains('td', '(WYSIWYG)'); + $this->withHtml($resp)->assertElementNotContains('td', '(Markdown)'); + + $this->asAdmin()->put($page->getUrl(), ['name' => 'Updated page', 'markdown' => '# Some markdown content']); + $resp = $this->get($page->refresh()->getUrl('/revisions')); + $this->withHtml($resp)->assertElementContains('td', '(Markdown)'); + } }