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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-26 15:06:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-26 15:06:18 +0300
commit6a4ffad42050949fcf08e78147575734ae99627e (patch)
tree723bb2480948ba4ec29ca9ac10f8728dc2a831b6 /spec/models/project_services
parent23d237110e6a646dec08e1f5b4696d2d9c51cfef (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/project_services')
-rw-r--r--spec/models/project_services/jira_service_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/project_services/jira_service_spec.rb b/spec/models/project_services/jira_service_spec.rb
index 5feb8ca7839..a6dd95437e3 100644
--- a/spec/models/project_services/jira_service_spec.rb
+++ b/spec/models/project_services/jira_service_spec.rb
@@ -431,6 +431,16 @@ describe JiraService do
).once
end
+ context 'when "comment_on_event_enabled" is set to false' do
+ it 'creates Remote Link reference but does not create comment' do
+ allow(@jira_service).to receive_messages(comment_on_event_enabled: false)
+ @jira_service.close_issue(resource, ExternalIssue.new('JIRA-123', project))
+
+ expect(WebMock).not_to have_requested(:post, @comment_url)
+ expect(WebMock).to have_requested(:post, @remote_link_url)
+ end
+ end
+
it 'does not send comment or remote links to issues already closed' do
allow_any_instance_of(JIRA::Resource::Issue).to receive(:resolution).and_return(true)