1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Copied over work from user_permissions branch

Only that relevant to the additional testing work.
This commit is contained in:
Dan Brown
2023-01-21 11:08:34 +00:00
parent 6070d804f8
commit c724bfe4d3
72 changed files with 1566 additions and 545 deletions

View File

@ -11,8 +11,8 @@ class EntityAccessTest extends TestCase
public function test_entities_viewable_after_creator_deletion()
{
// Create required assets and revisions
$creator = $this->getEditor();
$updater = $this->getViewer();
$creator = $this->users->editor();
$updater = $this->users->viewer();
$entities = $this->entities->createChainBelongingToUser($creator, $updater);
app()->make(UserRepo::class)->destroy($creator);
$this->entities->updatePage($entities['page'], ['html' => '<p>hello!</p>>']);
@ -23,8 +23,8 @@ class EntityAccessTest extends TestCase
public function test_entities_viewable_after_updater_deletion()
{
// Create required assets and revisions
$creator = $this->getViewer();
$updater = $this->getEditor();
$creator = $this->users->viewer();
$updater = $this->users->editor();
$entities = $this->entities->createChainBelongingToUser($creator, $updater);
app()->make(UserRepo::class)->destroy($updater);
$this->entities->updatePage($entities['page'], ['html' => '<p>Hello there!</p>']);