diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-10-27 19:20:47 -0200 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-11-04 12:24:17 -0200 |
commit | 8c2143a0a7330768211b8a03a6693ac823679339 (patch) | |
tree | 7e1cee6db7131856d71e110340ce8ee76c88a42d /app/models/project_services/jira_service.rb | |
parent | e4c05de75ccec1b0d64a7a994f05d54bffc903e5 (diff) | |
download | gitlab-ce-8c2143a0a7330768211b8a03a6693ac823679339.tar.gz |
Allow to test JIRA service when project does not have repositoryissue_23032
Diffstat (limited to 'app/models/project_services/jira_service.rb')
-rw-r--r-- | app/models/project_services/jira_service.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/models/project_services/jira_service.rb b/app/models/project_services/jira_service.rb index 0a493b7a12b..2dbe0075465 100644 --- a/app/models/project_services/jira_service.rb +++ b/app/models/project_services/jira_service.rb @@ -163,6 +163,21 @@ class JiraService < IssueTrackerService add_comment(data, issue_key) end + # reason why service cannot be tested + def disabled_title + "Please fill in Password and Username." + end + + def can_test? + username.present? && password.present? + end + + # JIRA does not need test data. + # We are requesting the project that belongs to the project key. + def test_data(user = nil, project = nil) + nil + end + def test_settings return unless url.present? # Test settings by getting the project |