diff options
Diffstat (limited to 'spec/factories/integrations.rb')
-rw-r--r-- | spec/factories/integrations.rb | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/spec/factories/integrations.rb b/spec/factories/integrations.rb index 6bd6deb262a..fd570ca9c50 100644 --- a/spec/factories/integrations.rb +++ b/spec/factories/integrations.rb @@ -6,7 +6,7 @@ FactoryBot.define do type { 'Integration' } end - factory :custom_issue_tracker_service, class: 'CustomIssueTrackerService' do + factory :custom_issue_tracker_integration, class: 'Integrations::CustomIssueTracker' do project active { true } issue_tracker @@ -38,14 +38,14 @@ FactoryBot.define do end end - factory :drone_ci_service do + factory :drone_ci_integration, class: 'Integrations::DroneCi' do project active { true } drone_url { 'https://bamboo.example.com' } token { 'test' } end - factory :jira_service do + factory :jira_service, class: 'Integrations::Jira' do project active { true } type { 'JiraService' } @@ -79,31 +79,31 @@ FactoryBot.define do end end - factory :confluence_service, class: 'Integrations::Confluence' do + factory :confluence_integration, class: 'Integrations::Confluence' do project active { true } confluence_url { 'https://example.atlassian.net/wiki' } end - factory :bugzilla_service do + factory :bugzilla_integration, class: 'Integrations::Bugzilla' do project active { true } issue_tracker end - factory :redmine_service do + factory :redmine_service, class: 'Integrations::Redmine' do project active { true } issue_tracker end - factory :youtrack_service do + factory :youtrack_service, class: 'Integrations::Youtrack' do project active { true } issue_tracker end - factory :ewm_service do + factory :ewm_service, class: 'Integrations::Ewm' do project active { true } issue_tracker @@ -127,14 +127,14 @@ FactoryBot.define do end end - factory :external_wiki_service do + factory :external_wiki_service, class: 'Integrations::ExternalWiki' do project - type { ExternalWikiService } + type { 'ExternalWikiService' } active { true } external_wiki_url { 'http://external-wiki-url.com' } end - factory :open_project_service do + factory :open_project_service, class: 'Integrations::OpenProject' do project active { true } @@ -160,14 +160,20 @@ FactoryBot.define do password { 'my-secret-password' } end - factory :slack_service do + factory :slack_service, class: 'Integrations::Slack' do project active { true } webhook { 'https://slack.service.url' } type { 'SlackService' } end - factory :pipelines_email_service do + factory :slack_slash_commands_service, class: 'Integrations::SlackSlashCommands' do + project + active { true } + type { 'SlackSlashCommandsService' } + end + + factory :pipelines_email_service, class: 'Integrations::PipelinesEmail' do project active { true } type { 'PipelinesEmailService' } @@ -182,13 +188,13 @@ FactoryBot.define do create_data { false } after(:build) do - IssueTrackerService.skip_callback(:validation, :before, :handle_properties) + Integrations::BaseIssueTracker.skip_callback(:validation, :before, :handle_properties) end to_create { |instance| instance.save!(validate: false) } after(:create) do - IssueTrackerService.set_callback(:validation, :before, :handle_properties) + Integrations::BaseIssueTracker.set_callback(:validation, :before, :handle_properties) end end |