Commit Graph

22 Commits

Author SHA1 Message Date
Daniel Schädler c3af6f9232
Rubocop -A 2021-08-15 14:31:50 +02:00
Daniel Schädler 4925ea9d83 Make teams added to PlayoffStage configurable 2019-06-18 22:22:10 +02:00
Daniel Schädler 7630f6b432 Fix Typo 2019-06-17 15:02:30 +02:00
Daniel Schädler 6dff05b5e6 Test AdvanceTeamsInIntermediateStage Interactor 2019-06-17 15:02:30 +02:00
Daniel Schädler e0da9ff7b5 Assign empty array if object_to_save is nil before pushing values to it
https://stackoverflow.com/questions/12163625/create-or-append-to-array-in-ruby
2019-06-17 15:02:30 +02:00
Daniel Schädler c9e1e153df Add interactor to advance all teams stuck in single team matches
After playoffs are created, before saving the stage this interactor
goes to the intermediate stage, looks for all the matches that are
:single_team matches and populates the match below with their respective
"winner".
2019-06-17 15:02:30 +02:00
Daniel Schädler fc96b8f788 Correctly raise exceptions in mock 2019-06-14 15:53:12 +02:00
Daniel Schädler f04c11427a Assign default values on Group Stage creation
default values are assigned to instant_finalists_amount and
intermediate_round_participants_amount depending on playoff_teams_amount and group amount
2019-06-13 13:21:24 +02:00
Daniel Schädler d8a9b27ab3 Add test type to all interactor tests 2019-06-13 13:21:24 +02:00
Daniel Schädler f97c8e501c Remove unnecessary :group_stage_only tournament 2019-06-05 09:49:21 +02:00
Daniel Schädler 957788651c Update group_scores on match_score change if match is a group match 2019-06-05 09:49:21 +02:00
Daniel Schädler d61b3b2b63 Fix factory name for stageless tournament 2019-05-26 20:15:59 +02:00
Daniel Schädler d0d38a7972 Test populate_match_below Interactor 2019-05-26 20:15:58 +02:00
Daniel Schädler d2f5d3594e Test performance optimization
In general this generates less unnecessary faker data
2019-05-26 20:15:16 +02:00
Daniel Schädler 280b0c1dec Change status of Match to only represent being finished
The winner will be a attribute of the Match instead of something
that is written in its status.
2019-05-26 20:14:13 +02:00
Daniel Schädler 8388af20f0 Generalize tournament save interactor
It now is responsible for saving all ApplicationRecord objects to the
database. This will reduce code duplication one we have other objects
that need to be saved. (As we will soon need to save individual matches)
2019-05-26 20:14:13 +02:00
Daniel Schädler db1518bdbd Raise exceptions upon error in group_stage_service 2019-05-04 20:34:57 +02:00
Daniel Schädler bbeda07028 Change test / context / describe names 2019-05-04 20:34:57 +02:00
Daniel Schädler 6811c9e7eb Corrects Test name 2019-05-04 20:34:57 +02:00
Daniel Schädler 04b0476603 Test Add Group Stage Interactor 2019-05-04 20:34:57 +02:00
Daniel Schädler 7ba1f98fb4 Implements Adding Tournaments to Database 2018-11-29 11:58:27 +01:00
Daniel Schädler 26bcc3dc88 Implement Adding Playoffs to a tournament 2018-11-29 11:10:15 +01:00