diff options
author | Adam Niedzielski <adamsunday@gmail.com> | 2016-12-01 11:45:06 +0300 |
---|---|---|
committer | Adam Niedzielski <adamsunday@gmail.com> | 2016-12-01 11:45:06 +0300 |
commit | 1105597303496e60308f93441b591a6f7dfadc74 (patch) | |
tree | f0a493646d0dedd15274223b9f0534a61f38c158 /spec/services | |
parent | 2adc6568a6f94b2844c95a0b699a0be9bb8980d1 (diff) |
Refactor JiraService by moving code out of JiraService#execute method
The implicit interface of project services states that the "execute"
method is meant to be called when project hooks are executed.
Currently JiraService does not support any project events even though
JiraService#supported_events says that "commit" and "merge_request"
are supported. They are only used to render correct options in
JIRA configuration screen, but they are not supported.
Because of that, this commit makes "execute" method a no-op.
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/merge_requests/merge_service_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/services/merge_requests/merge_service_spec.rb b/spec/services/merge_requests/merge_service_spec.rb index dff1781d2aa..5a89acc96a4 100644 --- a/spec/services/merge_requests/merge_service_spec.rb +++ b/spec/services/merge_requests/merge_service_spec.rb @@ -75,7 +75,7 @@ describe MergeRequests::MergeService, services: true do commit = double('commit', safe_message: "Fixes #{jira_issue.to_reference}") allow(merge_request).to receive(:commits).and_return([commit]) - expect_any_instance_of(JiraService).to receive(:close_issue).with(merge_request, an_instance_of(JIRA::Resource::Issue)).once + expect_any_instance_of(JiraService).to receive(:close_issue).with(merge_request, jira_issue).once service.execute(merge_request) end |