Fix test coverage.

This commit is contained in:
James Cole
2019-08-17 12:08:09 +02:00
parent 1d4434698e
commit b53cbbe469
16 changed files with 83 additions and 213 deletions

View File

@@ -69,9 +69,6 @@ class ReportController extends Controller
case 'category-entry':
$html = $this->categoryEntry($attributes);
break;
case 'balance-amount':
$html = $this->balanceAmount($attributes);
break;
}
return response()->json(['html' => $html]);

View File

@@ -59,13 +59,13 @@ class BalanceController extends Controller
$helper = app(BalanceReportHelperInterface::class);
$report = $helper->getBalanceReport($accounts, $start, $end);
// TODO no budget.
// try {
try {
$result = view('reports.partials.balance', compact('report'))->render();
// @codeCoverageIgnoreStart
// } catch (Throwable $e) {
// Log::debug(sprintf('Could not render reports.partials.balance: %s', $e->getMessage()));
// $result = 'Could not render view.';
// }
} catch (Throwable $e) {
Log::debug(sprintf('Could not render reports.partials.balance: %s', $e->getMessage()));
$result = 'Could not render view.';
}
// @codeCoverageIgnoreEnd
$cache->store($result);