X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/756b55bbffedb6e5fde91f9fbc61f5a382f20705..refs/pull/5280/head:/tests/Entity/EntityAccessTest.php diff --git a/tests/Entity/EntityAccessTest.php b/tests/Entity/EntityAccessTest.php index f2f244538..2b7e5d5dd 100644 --- a/tests/Entity/EntityAccessTest.php +++ b/tests/Entity/EntityAccessTest.php @@ -2,9 +2,8 @@ namespace Tests\Entity; -use BookStack\Auth\UserRepo; use BookStack\Entities\Models\Entity; -use BookStack\Entities\Repos\PageRepo; +use BookStack\Users\UserRepo; use Tests\TestCase; class EntityAccessTest extends TestCase @@ -12,11 +11,11 @@ class EntityAccessTest extends TestCase public function test_entities_viewable_after_creator_deletion() { // Create required assets and revisions - $creator = $this->getEditor(); - $updater = $this->getViewer(); - $entities = $this->createEntityChainBelongingToUser($creator, $updater); + $creator = $this->users->editor(); + $updater = $this->users->viewer(); + $entities = $this->entities->createChainBelongingToUser($creator, $updater); app()->make(UserRepo::class)->destroy($creator); - app()->make(PageRepo::class)->update($entities['page'], ['html' => '
hello!
>']); + $this->entities->updatePage($entities['page'], ['html' => 'hello!
>']); $this->checkEntitiesViewable($entities); } @@ -24,11 +23,11 @@ class EntityAccessTest extends TestCase public function test_entities_viewable_after_updater_deletion() { // Create required assets and revisions - $creator = $this->getViewer(); - $updater = $this->getEditor(); - $entities = $this->createEntityChainBelongingToUser($creator, $updater); + $creator = $this->users->viewer(); + $updater = $this->users->editor(); + $entities = $this->entities->createChainBelongingToUser($creator, $updater); app()->make(UserRepo::class)->destroy($updater); - app()->make(PageRepo::class)->update($entities['page'], ['html' => 'Hello there!
']); + $this->entities->updatePage($entities['page'], ['html' => 'Hello there!
']); $this->checkEntitiesViewable($entities); }