mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-31 15:24:31 +03:00
@ -356,4 +356,14 @@ class PageTest extends TestCase
|
||||
$resp = $this->get('/');
|
||||
$this->withHtml($resp)->assertElementContains('#recently-updated-pages', $page->name);
|
||||
}
|
||||
|
||||
public function test_page_edit_without_update_permissions_but_with_view_redirects_to_page()
|
||||
{
|
||||
$page = $this->entities->page();
|
||||
|
||||
$resp = $this->asViewer()->get($page->getUrl('/edit'));
|
||||
$resp->assertRedirect($page->getUrl());
|
||||
|
||||
$resp->assertSessionHas('error', 'You do not have permission to access the requested page.');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user