summaryrefslogtreecommitdiff
path: root/spec/support/services_shared_context.rb
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2016-12-05 15:40:53 +0100
committerRobert Schilling <rschilling@student.tugraz.at>2016-12-09 17:20:12 +0100
commit593c912151eaef865d31fc2a8307ef6d337c2349 (patch)
tree1239614ffe9ab26ef7e24070e264c2394aceaa07 /spec/support/services_shared_context.rb
parent0f90fd639c9ed387426e0a8ec3a23ac33b37024c (diff)
downloadgitlab-ce-593c912151eaef865d31fc2a8307ef6d337c2349.tar.gz
Grapify the service API
Diffstat (limited to 'spec/support/services_shared_context.rb')
-rw-r--r--spec/support/services_shared_context.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/services_shared_context.rb b/spec/support/services_shared_context.rb
index d1c999cad4d..66c93890e31 100644
--- a/spec/support/services_shared_context.rb
+++ b/spec/support/services_shared_context.rb
@@ -16,8 +16,14 @@ Service.available_services_names.each do |service|
hash.merge!(k => 'secrettoken')
elsif k =~ /^(.*_url|url|webhook)/
hash.merge!(k => "http://example.com")
+ elsif service_klass.method_defined?("#{k}?")
+ hash.merge!(k => true)
elsif service == 'irker' && k == :recipients
hash.merge!(k => 'irc://irc.network.net:666/#channel')
+ elsif service == 'irker' && k == :server_port
+ hash.merge!(k => 1234)
+ elsif service == 'jira' && k == :jira_issue_transition_id
+ hash.merge!(k => 1234)
else
hash.merge!(k => "someword")
end