|
20 | 20 |
|
21 | 21 | expect(Rails.logger).to receive(:error).with("Player #{player_no_info.id} missing Riot info") |
22 | 22 |
|
23 | | - described_class.new.perform(player_no_info.id) |
| 23 | + described_class.new.perform(player_no_info.id, organization.id) |
24 | 24 |
|
25 | 25 | player_no_info.reload |
26 | 26 | expect(player_no_info.sync_status).to eq('error') |
|
34 | 34 |
|
35 | 35 | expect(Rails.logger).to receive(:error).with('Riot API key not configured') |
36 | 36 |
|
37 | | - described_class.new.perform(player.id) |
| 37 | + described_class.new.perform(player.id, organization.id) |
38 | 38 |
|
39 | 39 | player.reload |
40 | 40 | expect(player.sync_status).to eq('error') |
|
82 | 82 |
|
83 | 83 | expect(Rails.logger).to receive(:info).with("Successfully synced player #{player.id} from Riot API") |
84 | 84 |
|
85 | | - job.perform(player.id) |
| 85 | + job.perform(player.id, organization.id) |
86 | 86 |
|
87 | 87 | player.reload |
88 | 88 | expect(player.riot_puuid).to eq('test-puuid-123') |
|
113 | 113 |
|
114 | 114 | allow(job).to receive(:fetch_ranked_stats).and_return(ranked_data) |
115 | 115 |
|
116 | | - job.perform(player.id) |
| 116 | + job.perform(player.id, organization.id) |
117 | 117 | end |
118 | 118 |
|
119 | 119 | it 'defaults to BR1 when region is not set' do |
|
128 | 128 |
|
129 | 129 | allow(job).to receive(:fetch_ranked_stats).and_return(ranked_data) |
130 | 130 |
|
131 | | - job.perform(player.id) |
| 131 | + job.perform(player.id, organization.id) |
132 | 132 | end |
133 | 133 | end |
134 | 134 |
|
|
144 | 144 | expect(Rails.logger).to receive(:error).with("Failed to sync player #{player.id}: API Error") |
145 | 145 | expect(Rails.logger).to receive(:error).with(anything) # backtrace |
146 | 146 |
|
147 | | - job.perform(player.id) |
| 147 | + job.perform(player.id, organization.id) |
148 | 148 |
|
149 | 149 | player.reload |
150 | 150 | expect(player.sync_status).to eq('error') |
|
181 | 181 |
|
182 | 182 | allow(job).to receive(:fetch_ranked_stats).and_return([]) |
183 | 183 |
|
184 | | - job.perform(player_with_puuid.id) |
| 184 | + job.perform(player_with_puuid.id, organization.id) |
185 | 185 | end |
186 | 186 | end |
187 | 187 | end |
|
0 commit comments