Improve test coverage.

This commit is contained in:
James Cole
2019-07-27 13:54:06 +02:00
parent d94d34ca63
commit 67c0ef6ec6
29 changed files with 788 additions and 346 deletions

View File

@@ -128,6 +128,7 @@ class JobStatusControllerTest extends TestCase
$this->mockDefaultSession();
$importRepos->shouldReceive('countTransactions')->once()->andReturn(0);
$importRepos->shouldReceive('countByTag')->atLeast()->once()->andReturn(0);
// call thing.
$this->be($this->user());
@@ -155,6 +156,7 @@ class JobStatusControllerTest extends TestCase
$this->mockDefaultSession();
$importRepos->shouldReceive('countTransactions')->once()->andReturn(2);
$importRepos->shouldReceive('countByTag')->atLeast()->once()->andReturn(2);
$job = new ImportJob;
$job->user_id = $this->user()->id;
@@ -191,6 +193,7 @@ class JobStatusControllerTest extends TestCase
$this->mockDefaultSession();
$importRepos->shouldReceive('countTransactions')->once()->andReturn(1);
$importRepos->shouldReceive('countByTag')->atLeast()->once()->andReturn(1);
$job = new ImportJob;
$job->user_id = $this->user()->id;