Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7f9140cf
Commit
7f9140cf
authored
Oct 22, 2020
by
Arturo Herrero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract external wiki service factory
parent
e186a47d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
14 deletions
+9
-14
spec/factories/services.rb
spec/factories/services.rb
+7
-0
spec/services/bulk_create_integration_service_spec.rb
spec/services/bulk_create_integration_service_spec.rb
+2
-14
No files found.
spec/factories/services.rb
View file @
7f9140cf
...
...
@@ -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
}
...
...
spec/services/bulk_create_integration_service_spec.rb
View file @
7f9140cf
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment