mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
This fixes the tests.
This commit is contained in:
@@ -207,21 +207,6 @@ class JsonControllerTest extends TestCase
|
||||
$response->assertExactJson([$category->name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\JsonController::endTour
|
||||
*/
|
||||
public function testEndTour()
|
||||
{
|
||||
// mock stuff
|
||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('json.end-tour'));
|
||||
$response->assertStatus(200);
|
||||
$response->assertExactJson(['true']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\JsonController::expenseAccounts
|
||||
*/
|
||||
@@ -280,20 +265,6 @@ class JsonControllerTest extends TestCase
|
||||
$response->assertExactJson([$tag->tag]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\JsonController::tour
|
||||
*/
|
||||
public function testTour()
|
||||
{
|
||||
// mock stuff
|
||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('json.tour'));
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\JsonController::transactionJournals
|
||||
*/
|
||||
|
@@ -73,14 +73,13 @@ class NewUserControllerTest extends TestCase
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||
$accountRepos->shouldReceive('store')->times(3);
|
||||
$accountRepos->shouldReceive('store')->times(2);
|
||||
|
||||
|
||||
$data = [
|
||||
'bank_name' => 'New bank',
|
||||
'savings_balance' => '1000',
|
||||
'bank_balance' => '100',
|
||||
'credit_card_limit' => '1000',
|
||||
];
|
||||
$this->be($this->emptyUser());
|
||||
$response = $this->post(route('new-user.submit'), $data);
|
||||
@@ -97,7 +96,7 @@ class NewUserControllerTest extends TestCase
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||
$accountRepos->shouldReceive('store')->once();
|
||||
$accountRepos->shouldReceive('store')->twice();
|
||||
|
||||
$data = [
|
||||
'bank_name' => 'New bank',
|
||||
|
@@ -30,15 +30,8 @@ class SearchControllerTest extends TestCase
|
||||
public function testIndex()
|
||||
{
|
||||
$search = $this->mock(SearchInterface::class);
|
||||
$search->shouldReceive('setLimit')->once();
|
||||
$search->shouldReceive('parseQuery')->once();
|
||||
$search->shouldReceive('hasModifiers')->once()->andReturn(false);
|
||||
$search->shouldReceive('getWordsAsString')->once()->andReturn('test');
|
||||
$search->shouldReceive('searchTransactions')->andReturn(new Collection)->once();
|
||||
$search->shouldReceive('searchBudgets')->andReturn(new Collection)->once();
|
||||
$search->shouldReceive('searchTags')->andReturn(new Collection)->once();
|
||||
$search->shouldReceive('searchCategories')->andReturn(new Collection)->once();
|
||||
$search->shouldReceive('searchAccounts')->andReturn(new Collection)->once();
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('search.index') . '?q=test');
|
||||
$response->assertStatus(200);
|
||||
|
Reference in New Issue
Block a user