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
c2a4bcdf
Commit
c2a4bcdf
authored
Nov 16, 2020
by
Arturo Herrero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test available services name for EE services
parent
3399305f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
ee/spec/models/service_spec.rb
ee/spec/models/service_spec.rb
+13
-2
No files found.
ee/spec/models/service_spec.rb
View file @
c2a4bcdf
...
...
@@ -3,6 +3,17 @@
require
'spec_helper'
RSpec
.
describe
Service
do
let
(
:ee_project_services
)
do
%w[
github
jenkins
]
end
describe
'.available_services_names'
do
it
{
expect
(
described_class
.
available_services_names
).
to
include
(
*
ee_project_services
)
}
end
describe
'.project_specific_services_names'
do
before
do
allow
(
::
Gitlab
).
to
receive
(
:com?
).
and_return
(
com
)
...
...
@@ -11,13 +22,13 @@ RSpec.describe Service do
context
'when not on gitlab.com'
do
let
(
:com
)
{
false
}
it
{
expect
(
described_class
.
project_specific_services_names
).
to
contain_exactly
(
'github'
,
'jenkins'
)
}
it
{
expect
(
described_class
.
project_specific_services_names
).
to
match_array
(
ee_project_services
)
}
end
context
'when on gitlab.com'
do
let
(
:com
)
{
true
}
it
{
expect
(
described_class
.
project_specific_services_names
).
to
contain_exactly
(
'github'
,
'gitlab_slack_application'
,
'jenkins'
)
}
it
{
expect
(
described_class
.
project_specific_services_names
).
to
match_array
(
ee_project_services
+
[
'gitlab_slack_application'
]
)
}
end
end
end
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