Commit 7f9140cf authored by Arturo Herrero's avatar Arturo Herrero

Extract external wiki service factory

parent e186a47d
......@@ -139,6 +139,13 @@ FactoryBot.define do
end
end
factory :external_wiki_service do
project
type { ExternalWikiService }
active { true }
external_wiki_url { 'http://external-wiki-url.com' }
end
factory :open_project_service do
project
active { true }
......
......@@ -49,13 +49,7 @@ RSpec.describe BulkCreateIntegrationService do
end
context 'with an external wiki integration' do
let(:integration) do
ExternalWikiService.create!(
instance: true,
active: true,
external_wiki_url: 'http://external-wiki-url.com'
)
end
let(:integration) { create(:external_wiki_service, :instance) }
it 'updates projects#has_external_wiki for external wiki services' do
described_class.new(integration, batch, association).execute
......@@ -73,13 +67,7 @@ RSpec.describe BulkCreateIntegrationService do
end
context 'with an inactive external wiki integration' do
let(:integration) do
ExternalWikiService.create!(
instance: true,
active: false,
external_wiki_url: 'http://external-wiki-url.com'
)
end
let(:integration) { create(:external_wiki_service, :instance, active: false) }
it 'does not update projects#has_external_wiki for external wiki services' do
described_class.new(integration, batch, association).execute
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment