Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-04-03 03:48:17 +0300
committerNick Thomas <nick@gitlab.com>2019-04-03 03:53:38 +0300
commitd17cce6aedf67139275362481c5b7fdeebf1b6a3 (patch)
tree765e6bc0f9a8a66690ae1c2c25c04f0accfa2123 /spec/services/git
parent645303c7e71d554c3ee1a338730d8b779c47acc1 (diff)
Only execute system hooks once when pushing tags
Diffstat (limited to 'spec/services/git')
-rw-r--r--spec/services/git/tag_push_service_spec.rb14
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 }