summaryrefslogtreecommitdiff
path: root/spec/factories/integrations.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/integrations.rb')
-rw-r--r--spec/factories/integrations.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/factories/integrations.rb b/spec/factories/integrations.rb
index a5a17ca4058..cb1c94c25c1 100644
--- a/spec/factories/integrations.rb
+++ b/spec/factories/integrations.rb
@@ -12,6 +12,12 @@ FactoryBot.define do
issue_tracker
end
+ factory :datadog_integration, class: 'Integrations::Datadog' do
+ project
+ active { true }
+ api_key { 'secret' }
+ end
+
factory :emails_on_push_integration, class: 'Integrations::EmailsOnPush' do
project
type { 'EmailsOnPushService' }
@@ -79,6 +85,32 @@ FactoryBot.define do
end
end
+ factory :zentao_integration, class: 'Integrations::Zentao' do
+ project
+ active { true }
+ type { 'ZentaoService' }
+
+ transient do
+ create_data { true }
+ url { 'https://jihudemo.zentao.net' }
+ api_url { '' }
+ api_token { 'ZENTAO_TOKEN' }
+ zentao_product_xid { '3' }
+ end
+
+ after(:build) do |integration, evaluator|
+ if evaluator.create_data
+ integration.zentao_tracker_data = build(:zentao_tracker_data,
+ integration: integration,
+ url: evaluator.url,
+ api_url: evaluator.api_url,
+ api_token: evaluator.api_token,
+ zentao_product_xid: evaluator.zentao_product_xid
+ )
+ end
+ end
+ end
+
factory :confluence_integration, class: 'Integrations::Confluence' do
project
active { true }