diff options
author | Hiroyuki Sato <sathiroyuki@gmail.com> | 2019-04-04 18:18:17 +0300 |
---|---|---|
committer | Hiroyuki Sato <sathiroyuki@gmail.com> | 2019-04-04 18:22:56 +0300 |
commit | 074a1797fe581c8eb5cc65bd56af584d5c500688 (patch) | |
tree | b4ffd9f8d4aee1b9792d7b1e8e2e505f1630f090 /spec/workers | |
parent | e6780501cbfd0cae31fadd15b2964204171091cc (diff) |
Update the project statistics immediatelly
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/project_cache_worker_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/workers/project_cache_worker_spec.rb b/spec/workers/project_cache_worker_spec.rb index 7053bfc2bfd..d2445f420f8 100644 --- a/spec/workers/project_cache_worker_spec.rb +++ b/spec/workers/project_cache_worker_spec.rb @@ -86,6 +86,10 @@ describe ProjectCacheWorker do it 'updates the project statistics' do stub_exclusive_lease(lease_key, timeout: lease_timeout) + expect(project.statistics).to receive(:refresh!) + .with(only: statistics.map(&:to_sym)) + .and_call_original + expect(UpdateProjectStatisticsWorker).to receive(:perform_in) .with(lease_timeout, project.id, statistics.map(&:to_sym)) .and_call_original |