|
151 | 151 | ) |
152 | 152 | end |
153 | 153 |
|
154 | | - it 'refreshes organization repository stars from stored observations' do |
| 154 | + it 'refreshes organization repository stars from previous monthly stats' do |
155 | 155 | source = instance_double(GitHubSource, platform: 'github', supports_organizations?: true) |
156 | 156 | allow(work_events).to receive(:successful_subject_ids).with( |
157 | 157 | { |
|
162 | 162 | platform: 'github' |
163 | 163 | } |
164 | 164 | ).and_return(Set.new) |
165 | | - allow(store).to receive(:refresh_organization_repository_star_deltas_from_observations) |
| 165 | + allow(store).to receive(:refresh_organization_repository_star_deltas_from_previous_stats) |
166 | 166 | allow(store).to receive(:refresh_organization_repository_metrics) |
167 | 167 |
|
168 | 168 | described_class.new(store: store, sources: [source], logger: logger, work_events: work_events) |
169 | 169 | .call(period, refresh_organization_stars: true) |
170 | 170 |
|
171 | | - expect(store).to have_received(:refresh_organization_repository_star_deltas_from_observations) |
| 171 | + expect(store).to have_received(:refresh_organization_repository_star_deltas_from_previous_stats) |
172 | 172 | .with(period, platform: 'github') |
173 | 173 | expect(store).to have_received(:refresh_organization_repository_metrics).with(period, platform: 'github') |
174 | 174 | end |
|
184 | 184 | platform: 'github' |
185 | 185 | } |
186 | 186 | ).and_return(Set['github']) |
187 | | - allow(store).to receive(:refresh_organization_repository_star_deltas_from_observations) |
| 187 | + allow(store).to receive(:refresh_organization_repository_star_deltas_from_previous_stats) |
188 | 188 | allow(store).to receive(:refresh_organization_repository_metrics) |
189 | 189 |
|
190 | 190 | described_class.new(store: store, sources: [source], logger: logger, work_events: work_events) |
191 | 191 | .call(period, refresh_organization_stars: true) |
192 | 192 |
|
193 | | - expect(store).not_to have_received(:refresh_organization_repository_star_deltas_from_observations) |
| 193 | + expect(store).not_to have_received(:refresh_organization_repository_star_deltas_from_previous_stats) |
194 | 194 | expect(store).not_to have_received(:refresh_organization_repository_metrics) |
195 | 195 | end |
196 | 196 |
|
|
0 commit comments