Improve test coverage.

This commit is contained in:
James Cole
2019-08-29 17:53:25 +02:00
parent 91b6b86202
commit 19feefda2d
86 changed files with 3173 additions and 2626 deletions

View File

@@ -518,7 +518,9 @@ class AccountRepository implements AccountRepositoryInterface
*/
public function searchAccount(string $query, array $types): Collection
{
$dbQuery = $this->user->accounts()->with(['accountType']);
$dbQuery = $this->user->accounts()
->where('active', 1)
->with(['accountType']);
if ('' !== $query) {
$search = sprintf('%%%s%%', $query);
$dbQuery->where('name', 'LIKE', $search);