First step in improving test coverage.

This commit is contained in:
James Cole
2018-08-30 20:58:07 +02:00
parent e158b9b64e
commit 33fe6dbfa3
19 changed files with 517 additions and 29 deletions

View File

@@ -102,10 +102,12 @@ class SearchController extends Controller
}
try {
$html = view('search.search', compact('transactions'))->render();
// @codeCoverageIgnoreStart
} catch (Throwable $e) {
Log::error(sprintf('Cannot render search.search: %s', $e->getMessage()));
$html = 'Could not render view.';
}
// @codeCoverageIgnoreEnd
return response()->json(['count' => $transactions->count(), 'html' => $html]);
}