services.rb 865 Bytes
Newer Older
1 2
FactoryGirl.define do
  factory :service do
3
    project factory: :empty_project
4 5 6 7 8 9 10 11 12 13 14 15 16
    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'
    )
17
  end
Valery Sizov's avatar
Valery Sizov committed
18 19 20 21 22 23 24 25 26 27

  factory :kubernetes_service do
    project factory: :empty_project
    active true
    properties({
      namespace: 'somepath',
      api_url: 'https://kubernetes.example.com',
      token: 'a' * 40,
    })
  end
28 29 30 31 32 33 34 35 36

  factory :jira_service do
    project factory: :empty_project
    active true
    properties(
      url: 'https://jira.example.com',
      project_key: 'jira-key'
    )
  end
37
end