Commit Graph

200 Commits

Author SHA1 Message Date
Daniel Schädler 777ee95281 Readability +4 2019-10-26 01:38:06 +02:00
Daniel Schädler b8f8ffb411 More space for hound to be happy with 2019-10-26 01:35:46 +02:00
Daniel Schädler b37f510534 Unnecessary Variables 2019-10-26 01:35:00 +02:00
Daniel Schädler 400a396f00 Test match index controller with filter 2019-10-26 01:23:15 +02:00
Daniel Schädler 82e4ff90dc Test tournament.matches method 2019-10-26 01:22:52 +02:00
Thor77 d317585168
Add "simple" parameter to tournament show 2019-10-25 23:17:08 +02:00
Daniel Schädler 945ab4981a Use let more effectively 2019-06-18 22:35:17 +02:00
Daniel Schädler fa9f47903b Test trying to change the state to something other than :finished 2019-06-18 22:22:10 +02:00
Daniel Schädler 90d97962a3 Test trying to finish a group stage with unfinished matches 2019-06-18 22:22:10 +02:00
Daniel Schädler fd8ff20ce8 Test for correct error on finishing already finished stages 2019-06-18 22:22:10 +02:00
Daniel Schädler 8873e7a95b Test stage.teams returning [] on empty stage 2019-06-18 22:22:10 +02:00
Daniel Schädler b28561043e Implement stages controller (GET UPDATE) 2019-06-18 22:22:10 +02:00
Daniel Schädler 3dfeae8bf3 Test #teams_sorted_by_group_scores 2019-06-18 22:22:10 +02:00
Daniel Schädler 15e2bd830f Randomize points in group_scores factory 2019-06-18 22:22:10 +02:00
Daniel Schädler 4925ea9d83 Make teams added to PlayoffStage configurable 2019-06-18 22:22:10 +02:00
Daniel Schädler 748ac18b35 Implement finished_group_match factory 2019-06-18 22:22:10 +02:00
Daniel Schädler 4e72d015ff Implement method to check if stage is over 2019-06-18 19:22:05 +02:00
Daniel Schädler 68efd3caae Add factory for a finished_playoff_match 2019-06-18 19:22:05 +02:00
Daniel Schädler bc0c7fddc3 Make match position randomizable 2019-06-18 19:22:05 +02:00
Daniel Schädler 386155a690 Fix last Match not being stopped correctly 2019-06-18 14:09:29 +02:00
Thor77 3109308817 Fix teams not associated with created tournament
when choosing a group stage
2019-06-18 13:29:31 +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 f35ba5c745 Create factory for :single_team_match 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 98319e9625 Assign :intermediate_stage to first stage if single_team matches present 2019-06-17 15:02:30 +02:00
Daniel Schädler 62f3ccba31 Rename method test 2019-06-17 15:02:30 +02:00
Daniel Schädler 5f378f27b2 Correct position for :single_team matches 2019-06-17 15:02:30 +02:00
Thor77 ce154a821c
Fix error message not changed in spec 2019-06-17 13:48:50 +02:00
Thor77 175870ab42
Prevent betting on running/finished matches 2019-06-17 13:48:50 +02:00
Thor77 48fc9fab57
Refactor spec to use let instead of class vars 2019-06-17 13:48:50 +02:00
Thor77 167a2116f1
Prevent duplicate bets on the same match 2019-06-17 13:48:50 +02:00
Thor77 ba758c73ff
Fix mock using throw instead of raise 2019-06-17 13:48:50 +02:00
Thor77 f08c4693ad
Expect UserServiceError in spec 2019-06-17 13:48:49 +02:00
Thor77 45ede9029e
Add :bet factory 2019-06-17 13:48:49 +02:00
Thor77 76e301e920
Add BetsController 2019-06-17 13:48:49 +02:00
Thor77 2f0127897e
Add UserService 2019-06-17 13:48:49 +02:00
Thor77 f3431e8442
Add bet model
* has_many relations in all belonging models
* specs for relations in existing models
* association specs for bet model
2019-06-17 13:48:49 +02:00
Daniel Schädler db70e33882 Assign number to each group 2019-06-17 13:37:06 +02:00
Daniel Schädler c2056df1ba Remove accidental focus: true 2019-06-17 13:37:06 +02:00
Daniel Schädler a74030a7ef Implement GroupsController 2019-06-16 13:22:15 +02:00
Daniel Schädler fc96b8f788 Correctly raise exceptions in mock 2019-06-14 15:53:12 +02:00
Daniel Schädler 41194ee181 Test group_stage state being assigned correctly 2019-06-13 16:13:06 +02:00
Daniel Schädler bb1b8798d8 DRY out group_stage_service_spec 2019-06-13 16:09:38 +02:00
Daniel Schädler 63db00b9ff Actually test if correct field gets set in error response 2019-06-13 13:28:34 +02:00
Daniel Schädler c8f69ccb16 Dry out tests for unacceptable playoff_teams_amount 2019-06-13 13:21:24 +02:00
Daniel Schädler 07f5388f6d Add Tests for TournamentService 2019-06-13 13:21:24 +02:00
Daniel Schädler 2e336262aa Add state to stage
This state is required to stop the group stage and trigger playoff
generation, it is (for now) irrelevant for anything other than that.
2019-06-13 13:21:24 +02:00
Daniel Schädler 4f64afd5fe Assign values to playoff transition relevant variables in factory 2019-06-13 13:21:24 +02:00