diff --git a/tests/controllers/SearchControllerTest.php b/tests/controllers/SearchControllerTest.php new file mode 100644 index 0000000000..c4478c342f --- /dev/null +++ b/tests/controllers/SearchControllerTest.php @@ -0,0 +1,56 @@ +be($user); + $words = ['Something']; + // mock! + $repository = $this->mock('FireflyIII\Support\Search\SearchInterface'); + $repository->shouldReceive('searchTransactions')->with($words)->once()->andReturn([]); + $repository->shouldReceive('searchAccounts')->with($words)->once()->andReturn([]); + $repository->shouldReceive('searchCategories')->with($words)->once()->andReturn([]); + $repository->shouldReceive('searchBudgets')->with($words)->once()->andReturn([]); + $repository->shouldReceive('searchTags')->with($words)->once()->andReturn([]); + + $this->call('GET','/search?q=Something'); + $this->assertResponseOk(); + } +} \ No newline at end of file