Mock groupstageservice when changing playoff params

This commit is contained in:
Daniel Schädler 2025-03-16 12:41:28 +01:00
parent ce537b7054
commit cccb8cc806
1 changed files with 1 additions and 0 deletions

View File

@ -384,6 +384,7 @@ RSpec.describe TournamentsController, type: :controller do
end end
it 'succeeds when all three are changed correctly' do it 'succeeds when all three are changed correctly' do
allow(GroupStageService).to receive(:get_advancing_teams).and_return(@filled_tournament.teams.take(4))
put :update, params: { id: @filled_tournament.to_param }.merge(intermediate_round_participants_amount: 2, put :update, params: { id: @filled_tournament.to_param }.merge(intermediate_round_participants_amount: 2,
instant_finalists_amount: 1, instant_finalists_amount: 1,
playoff_teams_amount: 2) playoff_teams_amount: 2)