gitlab-org--gitlab-foss/spec/factories/services.rb
Pawel Chojnacki dbb3c28088 Merge remote-tracking branch 'upstream/master' into 28717-additional-metrics-review-branch
# Conflicts:
#	app/models/project_services/prometheus_service.rb
#	app/views/projects/services/_form.html.haml
2017-06-07 10:27:52 +02:00

50 lines
1.1 KiB
Ruby

FactoryGirl.define do
factory :service do
project factory: :empty_project
type 'Service'
end
factory :custom_issue_tracker_service, class: CustomIssueTrackerService do
project factory: :empty_project
type 'CustomIssueTrackerService'
category 'issue_tracker'
active true
properties(
project_url: 'https://project.url.com',
issues_url: 'https://issues.url.com',
new_issue_url: 'https://newissue.url.com'
)
end
factory :kubernetes_service do
project factory: :empty_project
active true
properties({
api_url: 'https://kubernetes.example.com',
token: 'a' * 40
})
end
factory :prometheus_service do
project factory: :empty_project
active true
properties({
api_url: 'https://prometheus.example.com/'
})
end
factory :jira_service do
project factory: :empty_project
active true
properties(
url: 'https://jira.example.com',
project_key: 'jira-key'
)
end
factory :hipchat_service do
project factory: :empty_project
type 'HipchatService'
token 'test_token'
end
end