diff options
author | Stan Hu <stanhu@gmail.com> | 2019-03-22 21:38:08 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-03-22 21:38:08 +0300 |
commit | 7ffc79829194d3be18cf66017528a90b41586054 (patch) | |
tree | e09c42cfaf7fd166c8ddf28fefc6140e0c52f815 /spec/models/project_spec.rb | |
parent | 85a1acbe50a3db74d0298fc622170f0fd000988d (diff) | |
parent | e64589a370c9536f8701c4b7124242b2d1016ec1 (diff) |
Merge branch 'refresh-commit-count-after-head-change' into 'master'
Refresh commit count after repository head changes
Closes #59346
See merge request gitlab-org/gitlab-ce!26473
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r-- | spec/models/project_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 328133e5c3c..1ea54eeb4f7 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -2379,6 +2379,12 @@ describe Project do project.change_head(project.default_branch) end + it 'updates commit count' do + expect(ProjectCacheWorker).to receive(:perform_async).with(project.id, [], [:commit_count]) + + project.change_head(project.default_branch) + end + it 'copies the gitattributes' do expect(project.repository).to receive(:copy_gitattributes).with(project.default_branch) project.change_head(project.default_branch) |