Fix follower sync E2E CI helper

This commit is contained in:
Daniel Schädler 2026-04-14 14:50:49 +02:00
parent 38a3d7f8e3
commit ff83d7c370
1 changed files with 3 additions and 1 deletions

View File

@ -228,7 +228,9 @@ RSpec.describe 'Tournament follower sync HTTP E2E' do
end
def synced_team_id_pairs(source:, follower:)
source_by_name = source.fetch(:teams).index_by { |team| team.fetch(:name) }
source_by_name = source.fetch(:teams).each_with_object({}) do |team, teams_by_name|
teams_by_name[team.fetch(:name)] = team
end
follower.fetch(:teams).filter_map do |team|
source_team = source_by_name[team.fetch(:name)]
next if source_team.nil?