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
e81a0337
Commit
e81a0337
authored
Jun 08, 2020
by
Arturo Herrero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve spec descriptions
parent
6e81b31c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
spec/models/service_spec.rb
spec/models/service_spec.rb
+8
-6
No files found.
spec/models/service_spec.rb
View file @
e81a0337
...
...
@@ -280,11 +280,13 @@ describe Service do
describe
'.build_from_integration'
do
context
'when integration is invalid'
do
it
'sets service to inactive when integration is invalid'
do
template
=
build
(
:prometheus_service
,
template:
true
,
active:
true
,
properties:
{})
template
.
save
(
validate:
false
)
let
(
:integration
)
do
build
(
:prometheus_service
,
:template
,
active:
true
,
properties:
{})
.
tap
{
|
integration
|
integration
.
save
(
validate:
false
)
}
end
service
=
described_class
.
build_from_integration
(
project
.
id
,
template
)
it
'sets service to inactive'
do
service
=
described_class
.
build_from_integration
(
project
.
id
,
integration
)
expect
(
service
).
to
be_valid
expect
(
service
.
active
).
to
be
false
...
...
@@ -292,9 +294,9 @@ describe Service do
end
context
'when integration is an instance'
do
subjec
t
(
:integration
)
{
create
(
:jira_service
,
:instance
)
}
le
t
(
:integration
)
{
create
(
:jira_service
,
:instance
)
}
it
'sets
service inherit
from integration'
do
it
'sets
inherit_from_id
from integration'
do
service
=
described_class
.
build_from_integration
(
project
.
id
,
integration
)
expect
(
service
.
inherit_from_id
).
to
eq
(
integration
.
id
)
...
...
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