mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 05:26:17 +00:00
Also fixed tests.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
|
||||
/**
|
||||
@@ -19,6 +20,13 @@ class SearchControllerTest extends TestCase
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
$searcher = $this->mock('FireflyIII\Support\Search\SearchInterface');
|
||||
$searcher->shouldReceive('searchTransactions')->once()->with(['test'])->andReturn(new Collection);
|
||||
$searcher->shouldReceive('searchAccounts')->once()->with(['test'])->andReturn(new Collection);
|
||||
$searcher->shouldReceive('searchCategories')->once()->with(['test'])->andReturn(new Collection);
|
||||
$searcher->shouldReceive('searchBudgets')->once()->with(['test'])->andReturn(new Collection);
|
||||
$searcher->shouldReceive('searchTags')->once()->with(['test'])->andReturn(new Collection);
|
||||
|
||||
$this->be($this->user());
|
||||
$this->call('GET', '/search?q=test&search=');
|
||||
$this->assertResponseStatus(200);
|
||||
|
||||
Reference in New Issue
Block a user