summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-12-16 17:00:43 +0000
committerRémy Coutable <remy@rymai.me>2016-12-16 17:00:43 +0000
commit02ecc2225a324778c796dc6556d0dcd07fe660a7 (patch)
treedd56152965364faa92480804de626a7c026a0c4b /spec/services
parentae71032d0af1730c359089f3edc9029a8b5c8acc (diff)
parent9f97fa4d9f4e86e8f1ff1db4621bcf81390936da (diff)
downloadgitlab-ce-02ecc2225a324778c796dc6556d0dcd07fe660a7.tar.gz
Merge branch '25339-2-webhooks-fired-for-issue-closed-and-reopened' into 'master'
Ensure issuable state changes only fire webhooks once Webhooks were fired twice when issuables were reopened or closed. Once for the status change and once for the `update` operation Closes #25339 See merge request !8101
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/issues/update_service_spec.rb5
-rw-r--r--spec/services/merge_requests/update_service_spec.rb5
2 files changed, 10 insertions, 0 deletions
diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb
index 500d224ff98..eafbea46905 100644
--- a/spec/services/issues/update_service_spec.rb
+++ b/spec/services/issues/update_service_spec.rb
@@ -376,5 +376,10 @@ describe Issues::UpdateService, services: true do
let(:mentionable) { issue }
include_examples 'updating mentions', Issues::UpdateService
end
+
+ include_examples 'issuable update service' do
+ let(:open_issuable) { issue }
+ let(:closed_issuable) { create(:closed_issue, project: project) }
+ end
end
end
diff --git a/spec/services/merge_requests/update_service_spec.rb b/spec/services/merge_requests/update_service_spec.rb
index 790ef765f3a..88c786947d3 100644
--- a/spec/services/merge_requests/update_service_spec.rb
+++ b/spec/services/merge_requests/update_service_spec.rb
@@ -320,5 +320,10 @@ describe MergeRequests::UpdateService, services: true do
expect(issue_ids).to be_empty
end
end
+
+ include_examples 'issuable update service' do
+ let(:open_issuable) { merge_request }
+ let(:closed_issuable) { create(:closed_merge_request, source_project: project) }
+ end
end
end