diff options
author | Rémy Coutable <remy@rymai.me> | 2019-04-03 10:20:50 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-04-03 10:20:50 +0000 |
commit | 7700e0298802857495bd3d0e7601a5d47a7b3335 (patch) | |
tree | 43d8f7e5edc761091616d4cfb08b7b4851c7efb4 /spec | |
parent | 5a6908e3e57623847ef19b2e51ccc48fb1010e90 (diff) | |
parent | d17cce6aedf67139275362481c5b7fdeebf1b6a3 (diff) | |
download | gitlab-ce-7700e0298802857495bd3d0e7601a5d47a7b3335.tar.gz |
Merge branch '52560-fix-duplicate-tag-system-hooks' into 'master'
Only execute system hooks once when pushing tags
Closes #52560
See merge request gitlab-org/gitlab-ce!26888
Diffstat (limited to 'spec')
-rw-r--r-- | spec/services/git/tag_push_service_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/services/git/tag_push_service_spec.rb b/spec/services/git/tag_push_service_spec.rb index e151db5827f..2d960fc9f08 100644 --- a/spec/services/git/tag_push_service_spec.rb +++ b/spec/services/git/tag_push_service_spec.rb @@ -31,6 +31,20 @@ describe Git::TagPushService do end end + describe 'System Hooks' do + let!(:push_data) { service.tap(&:execute).push_data } + + it "executes system hooks after pushing a tag" do + expect_next_instance_of(SystemHooksService) do |system_hooks_service| + expect(system_hooks_service) + .to receive(:execute_hooks) + .with(push_data, :tag_push_hooks) + end + + service.execute + end + end + describe "Pipelines" do subject { service.execute } |