summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-03-22 18:38:08 +0000
committerStan Hu <stanhu@gmail.com>2019-03-22 18:38:08 +0000
commit7ffc79829194d3be18cf66017528a90b41586054 (patch)
treee09c42cfaf7fd166c8ddf28fefc6140e0c52f815 /spec/models
parent85a1acbe50a3db74d0298fc622170f0fd000988d (diff)
parente64589a370c9536f8701c4b7124242b2d1016ec1 (diff)
downloadgitlab-ce-7ffc79829194d3be18cf66017528a90b41586054.tar.gz
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')
-rw-r--r--spec/models/project_spec.rb6
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)