diff options
author | Jarka Košanová <jarka@gitlab.com> | 2019-07-11 11:53:08 +0200 |
---|---|---|
committer | Jarka Košanová <jarka@gitlab.com> | 2019-07-16 10:04:54 +0200 |
commit | c8e24280c55b5678bc2c01435ab26781bbbb6cd2 (patch) | |
tree | 73c001626e005b7df622db6a329158376567697d /spec/factories/projects.rb | |
parent | 00b944afb88d1e52add0724c7d5cc6b62505ec32 (diff) | |
download | gitlab-ce-c8e24280c55b5678bc2c01435ab26781bbbb6cd2.tar.gz |
Simplify factories for services
- use predefined factories when creating
projects with services
- remove unnecessary arguments
Diffstat (limited to 'spec/factories/projects.rb')
-rw-r--r-- | spec/factories/projects.rb | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb index 743ec322885..7d7738a30c8 100644 --- a/spec/factories/projects.rb +++ b/spec/factories/projects.rb @@ -306,34 +306,18 @@ FactoryBot.define do factory :redmine_project, parent: :project do has_external_issue_tracker true - after :create do |project| - project.create_redmine_service( - active: true, - properties: { - 'project_url' => 'http://redmine/projects/project_name_in_redmine', - 'issues_url' => 'http://redmine/projects/project_name_in_redmine/issues/:id', - 'new_issue_url' => 'http://redmine/projects/project_name_in_redmine/issues/new' - } - ) - end + redmine_service end factory :youtrack_project, parent: :project do has_external_issue_tracker true - after :create do |project| - project.create_youtrack_service( - active: true, - properties: { - 'project_url' => 'http://youtrack/projects/project_guid_in_youtrack', - 'issues_url' => 'http://youtrack/issues/:id' - } - ) - end + youtrack_service end factory :jira_project, parent: :project do has_external_issue_tracker true + jira_service end |