mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-01 03:29:33 +00:00
Improve test coverage.
This commit is contained in:
@@ -53,9 +53,9 @@ class IndexControllerTest extends TestCase
|
||||
public function testIndex(): void
|
||||
{
|
||||
$this->mockDefaultSession();
|
||||
$group = $this->getRandomWithdrawalGroup();
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
$collector = $this->mock(GroupCollectorInterface::class);
|
||||
$group = $this->getRandomWithdrawalGroup();
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
$collector = $this->mock(GroupCollectorInterface::class);
|
||||
|
||||
// generic set for the info blocks:
|
||||
$groupArray = [$this->getRandomWithdrawalAsArray()];
|
||||
@@ -95,9 +95,9 @@ class IndexControllerTest extends TestCase
|
||||
public function testIndexAll(): void
|
||||
{
|
||||
$this->mockDefaultSession();
|
||||
$group = $this->getRandomWithdrawalGroup();
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
$collector = $this->mock(GroupCollectorInterface::class);
|
||||
$group = $this->getRandomWithdrawalGroup();
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
$collector = $this->mock(GroupCollectorInterface::class);
|
||||
|
||||
// role?
|
||||
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->andReturn(true);
|
||||
|
||||
Reference in New Issue
Block a user