mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-19 08:00:19 +00:00
Expand tests.
This commit is contained in:
@@ -55,6 +55,7 @@ class IndexControllerTest extends TestCase
|
||||
*/
|
||||
public function testDownload()
|
||||
{
|
||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||
//$job = $this->user()->importJobs()->where('key', 'testImport')->first();
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('import.download', ['testImport']));
|
||||
@@ -67,7 +68,7 @@ class IndexControllerTest extends TestCase
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
|
||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('import.index'));
|
||||
$response->assertStatus(200);
|
||||
@@ -79,6 +80,7 @@ class IndexControllerTest extends TestCase
|
||||
*/
|
||||
public function testStart()
|
||||
{
|
||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||
$routine = $this->mock(FileRoutine::class);
|
||||
$routine->shouldReceive('setJob')->once();
|
||||
$routine->shouldReceive('run')->once()->andReturn(true);
|
||||
@@ -94,6 +96,7 @@ class IndexControllerTest extends TestCase
|
||||
*/
|
||||
public function testStartFailed()
|
||||
{
|
||||
$repository = $this->mock(ImportJobRepositoryInterface::class);
|
||||
$routine = $this->mock(FileRoutine::class);
|
||||
$routine->shouldReceive('setJob')->once();
|
||||
$routine->shouldReceive('run')->once()->andReturn(false);
|
||||
|
||||
Reference in New Issue
Block a user