Skip to content

Commit

Permalink
Add extra cases for no Problem or an unknown one.
Browse files Browse the repository at this point in the history
  • Loading branch information
vmcj committed Aug 1, 2023
1 parent ba8c733 commit c0648c5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions webapp/tests/Unit/Controller/Jury/ContestControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,20 @@ class ContestControllerTest extends JuryControllerTestCase
'allowJudge' => '1',
'color' => '#000000',
'lazyEvalResults' => '0']], 'name' => 'Problem shortname empty']],
'Unknown problem provided' => [['problems' => ['0' => ['problem' => '',
'shortname' => 'empty_problem',
'points' => '3',
'allowSubmit' => '1',
'allowJudge' => '1',
'color' => '#000000',
'lazyEvalResults' => '0']], 'name' => 'No problem provided']],
'The selected choice is invalid.' => [['problems' => ['0' => ['problem' => '404',
'shortname' => 'unknown_problem',
'points' => '3',
'allowSubmit' => '1',
'allowJudge' => '1',
'color' => '#000000',
'lazyEvalResults' => '0']], 'name' => 'No known problem']],
'Only alphanumeric characters and ._- are allowed' => [['shortname' => '"quoted"']]];

protected static array $addEntitiesFailureNonLocal = ['This value should not be blank.' => [['externalid' => '', 'name' => 'Empty externalid']]];
Expand Down

0 comments on commit c0648c5

Please sign in to comment.