mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix tests
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
use FireflyIII\Export\Processor;
|
||||
|
||||
use FireflyIII\Repositories\ExportJob\ExportJobRepositoryInterface;
|
||||
|
||||
/**
|
||||
* Generated by PHPUnit_SkeletonGenerator on 2016-12-10 at 05:51:41.
|
||||
@@ -32,6 +32,10 @@ class ExportControllerTest extends TestCase
|
||||
*/
|
||||
public function testDownload()
|
||||
{
|
||||
$repository = $this->mock(ExportJobRepositoryInterface::class);
|
||||
$repository->shouldReceive('exists')->once()->andReturn(true);
|
||||
$repository->shouldReceive('getContent')->once()->andReturn('Some content beep boop');
|
||||
|
||||
$this->be($this->user());
|
||||
$this->call('GET', route('export.download', ['testExport']));
|
||||
$this->assertResponseStatus(200);
|
||||
|
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
use FireflyIII\Import\Setup\CsvSetup;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
|
||||
use FireflyIII\Import\ImportProcedureInterface;
|
||||
|
||||
/**
|
||||
* Generated by PHPUnit_SkeletonGenerator on 2016-12-10 at 05:51:41.
|
||||
@@ -142,6 +142,11 @@ class ImportControllerTest extends TestCase
|
||||
*/
|
||||
public function testStart()
|
||||
{
|
||||
/** @var ImportProcedureInterface $procedure */
|
||||
$procedure = $this->mock(ImportProcedureInterface::class);
|
||||
|
||||
$procedure->shouldReceive('runImport');
|
||||
|
||||
$this->be($this->user());
|
||||
$this->call('post', route('import.start', ['complete']));
|
||||
$this->assertResponseStatus(200);
|
||||
@@ -156,7 +161,7 @@ class ImportControllerTest extends TestCase
|
||||
// complete
|
||||
$this->be($this->user());
|
||||
$this->call('get', route('import.status', ['complete']));
|
||||
$this->assertResponseStatus(302);
|
||||
$this->assertResponseStatus(200);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user