1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-06 12:02:45 +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:
Dan Brown
2022-12-15 12:29:10 +00:00
parent d54ea1b3ed
commit f844ae0902
66 changed files with 595 additions and 514 deletions

View File

@@ -16,7 +16,7 @@ class ClearViewsCommandTest extends TestCase
$this->get($page->getUrl());
$this->assertDatabaseHas('views', [
'user_id' => $this->getEditor()->id,
'user_id' => $this->users->editor()->id,
'viewable_id' => $page->id,
'views' => 1,
]);
@@ -27,7 +27,7 @@ class ClearViewsCommandTest extends TestCase
$this->assertTrue($exitCode === 0, 'Command executed successfully');
$this->assertDatabaseMissing('views', [
'user_id' => $this->getEditor()->id,
'user_id' => $this->users->editor()->id,
]);
}
}