mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-09 10:22:51 +03:00
Create additional test helper classes
Following recent similar actions done for entities. Required at this stage to provider better & cleaner helpers for common user and permission actions to built out permission testing.
This commit is contained in:
@@ -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>']);
|
||||
|
Reference in New Issue
Block a user