Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kortirso committed Apr 17, 2024
1 parent 309a20c commit e240922
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/services/games/update_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ def add_data_for_games_player_update(games_player, points, statistic)
end

def update_players
@players_seasons_mass_update_job.perform_later(season_id: @game.week.season_id, player_ids: @player_ids)
@players_seasons_mass_update_job.perform_later(
season_id: @game.week.season_id,
player_ids: @player_ids.sort
)
end
end
end
2 changes: 1 addition & 1 deletion spec/services/games/update_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
expect(game.reload.points).to eq([1, 2])
expect(Players::Seasons::MassUpdateJob).to have_received(:perform_later).with(
season_id: game.week.season_id,
player_ids: [teams_player1.player_id, teams_player3.player_id, teams_player2.player_id]
player_ids: [teams_player1.player_id, teams_player3.player_id, teams_player2.player_id].sort
)
end
end
Expand Down

0 comments on commit e240922

Please sign in to comment.