1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-06 12:02:45 +03:00

Updated page revisions link visibility

To match the actual visibilities of the revisions listing page and
options.
Related to #2946
This commit is contained in:
Dan Brown
2022-09-03 12:32:21 +01:00
parent 9158a66bff
commit 2fe261e207
4 changed files with 27 additions and 7 deletions

View File

@@ -9,6 +9,18 @@ use Tests\TestCase;
class PageRevisionTest extends TestCase
{
public function test_revision_links_visible_to_viewer()
{
/** @var Page $page */
$page = Page::query()->first();
$html = $this->withHtml($this->asViewer()->get($page->getUrl()));
$html->assertLinkExists($page->getUrl('/revisions'));
$html->assertElementContains('a', 'Revisions');
$html->assertElementContains('a', 'Revision #1');
}
public function test_page_revision_views_viewable()
{
$this->asEditor();