]> BookStack Code Mirror - bookstack/blobdiff - tests/Entity/PageRevisionTest.php
Added language list favourites sorting, updated styles
[bookstack] / tests / Entity / PageRevisionTest.php
index fc6678788636df222c405f34e58823643b4c3be2..cc49002492cdbafd44128e905b5676de54c3e8b7 100644 (file)
@@ -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)');
+    }
 }