Optimise tests and coverage.

This commit is contained in:
James Cole
2018-05-13 09:01:10 +02:00
parent 528da3f08e
commit 1aae84a4d0
13 changed files with 154 additions and 106 deletions

View File

@@ -197,7 +197,6 @@ class JobStatusControllerTest extends TestCase
$routine = $this->mock(FakeRoutine::class);
// mock calls:
$repository->shouldReceive('setStatus')->once()->withArgs([Mockery::any(), 'running']);
$routine->shouldReceive('setImportJob')->once();
$routine->shouldReceive('run')->once();
@@ -227,7 +226,6 @@ class JobStatusControllerTest extends TestCase
$routine = $this->mock(FakeRoutine::class);
// mock calls:
$repository->shouldReceive('setStatus')->once()->withArgs([Mockery::any(), 'running']);
$repository->shouldReceive('setStatus')->once()->withArgs([Mockery::any(), 'error']);
$routine->shouldReceive('setImportJob')->once();
$routine->shouldReceive('run')->andThrow(new Exception('Unknown exception'));
@@ -258,7 +256,6 @@ class JobStatusControllerTest extends TestCase
$routine = $this->mock(FakeRoutine::class);
// mock calls:
$repository->shouldReceive('setStatus')->once()->withArgs([Mockery::any(), 'running']);
$repository->shouldReceive('setStatus')->once()->withArgs([Mockery::any(), 'error']);
$routine->shouldReceive('setImportJob')->once();
$routine->shouldReceive('run')->andThrow(new FireflyException('Unknown exception'));