This fixes the tests.

This commit is contained in:
James Cole
2016-12-27 15:46:52 +01:00
parent be201e811d
commit 349d254193
6 changed files with 41 additions and 19 deletions

View File

@@ -9,6 +9,7 @@
* See the LICENSE file for details.
*/
use FireflyIII\Export\Processor;
use FireflyIII\Models\ExportJob;
use FireflyIII\Repositories\ExportJob\ExportJobRepositoryInterface;
/**
@@ -83,6 +84,10 @@ class ExportControllerTest extends TestCase
$processor->shouldReceive('exportJournals')->once();
$processor->shouldReceive('createZipFile')->once();
$repository = $this->mock(ExportJobRepositoryInterface::class);
$repository->shouldReceive('changeStatus')->andReturn(true);
$repository->shouldReceive('findByKey')->andReturn(new ExportJob);
$this->be($this->user());
$this->call('post', route('export.export'), $data);