mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-22 20:36:43 +00:00
Fix tests for current feature set.
This commit is contained in:
@@ -93,6 +93,8 @@ class JobStatusControllerTest extends TestCase
|
||||
$job->file_type = '';
|
||||
$job->save();
|
||||
|
||||
$importRepos->shouldReceive('countTransactions')->once()->andReturn(0);
|
||||
|
||||
// call thing.
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('import.job.status.json', [$job->key]));
|
||||
@@ -120,6 +122,8 @@ class JobStatusControllerTest extends TestCase
|
||||
$job->tag()->associate($tag);
|
||||
$job->save();
|
||||
|
||||
$importRepos->shouldReceive('countTransactions')->once()->andReturn(0);
|
||||
|
||||
// call thing.
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('import.job.status.json', [$job->key]));
|
||||
@@ -143,6 +147,8 @@ class JobStatusControllerTest extends TestCase
|
||||
$second = $this->user()->transactionJournals()->where('id', '!=', $journal->id)->first();
|
||||
$tag->transactionJournals()->sync([$journal->id, $second->id]);
|
||||
|
||||
$importRepos->shouldReceive('countTransactions')->once()->andReturn(2);
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'Dfake_job_' . random_int(1, 10000);
|
||||
@@ -175,6 +181,8 @@ class JobStatusControllerTest extends TestCase
|
||||
$journal = $this->user()->transactionJournals()->first();
|
||||
$tag->transactionJournals()->sync([$journal->id]);
|
||||
|
||||
$importRepos->shouldReceive('countTransactions')->once()->andReturn(1);
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'Efake_job_' . random_int(1, 10000);
|
||||
|
Reference in New Issue
Block a user