Tets for BonusScoreController
This commit is contained in:
parent
0af15bf753
commit
119b8228c3
|
|
@ -73,26 +73,25 @@ class BonusScoreController extends Controller
|
||||||
// Set the new score
|
// Set the new score
|
||||||
try {
|
try {
|
||||||
$saveBonusScore($judge, $entry, $validData['score']);
|
$saveBonusScore($judge, $entry, $validData['score']);
|
||||||
|
|
||||||
} catch (AuditionAdminException $ex) {
|
} catch (AuditionAdminException $ex) {
|
||||||
DB::rollBack();
|
DB::rollBack();
|
||||||
|
|
||||||
return redirect()->route('bonus-scores.entryBonusScoreSheet',
|
return redirect()->route('bonus-scores.entryBonusScoreSheet',
|
||||||
['entry_id' => $entry->id])->with('error', 'Error entering score - '.$ex->getMessage());
|
['entry_id' => $entry->id])->with('error', 'Error entering score - '.$ex->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DB::commit();
|
DB::commit();
|
||||||
|
/* @codeCoverageIgnoreStart */
|
||||||
} catch (\Exception) {
|
} catch (\Exception) {
|
||||||
DB::rollBack();
|
DB::rollBack();
|
||||||
|
|
||||||
return redirect()->route('bonus-scores.entryBonusScoreSheet', ['entry_id' => $entry->id])->with('error', 'Error entering score - '.$ex->getMessage());
|
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');
|
return redirect()->route('bonus-scores.entryBonusScoreSheet', ['entry_id' => $entry->id])->with('success', 'New bonus score entered');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function destroyBonusScore()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue