From 119b8228c30197d264282b60ac8e5237e736bfdb Mon Sep 17 00:00:00 2001 From: Matt Young Date: Tue, 15 Jul 2025 10:18:43 -0500 Subject: [PATCH] Tets for BonusScoreController --- app/Http/Controllers/Tabulation/BonusScoreController.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Tabulation/BonusScoreController.php b/app/Http/Controllers/Tabulation/BonusScoreController.php index cb2e8a8..6af9343 100644 --- a/app/Http/Controllers/Tabulation/BonusScoreController.php +++ b/app/Http/Controllers/Tabulation/BonusScoreController.php @@ -73,26 +73,25 @@ class BonusScoreController extends Controller // Set the new score try { $saveBonusScore($judge, $entry, $validData['score']); + } catch (AuditionAdminException $ex) { DB::rollBack(); return redirect()->route('bonus-scores.entryBonusScoreSheet', ['entry_id' => $entry->id])->with('error', 'Error entering score - '.$ex->getMessage()); } + } DB::commit(); + /* @codeCoverageIgnoreStart */ } catch (\Exception) { DB::rollBack(); return redirect()->route('bonus-scores.entryBonusScoreSheet', ['entry_id' => $entry->id])->with('error', 'Error entering score - '.$ex->getMessage()); } + /* @codeCoverageIgnoreEnd */ return redirect()->route('bonus-scores.entryBonusScoreSheet', ['entry_id' => $entry->id])->with('success', 'New bonus score entered'); } - - public function destroyBonusScore() - { - - } }