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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
b50bfb04
Commit
b50bfb04
authored
Feb 06, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix indentation offenses in ensure stage service
parent
538ad92a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
spec/services/ci/ensure_stage_service_spec.rb
spec/services/ci/ensure_stage_service_spec.rb
+12
-12
No files found.
spec/services/ci/ensure_stage_service_spec.rb
View file @
b50bfb04
...
...
@@ -10,27 +10,27 @@ describe Ci::EnsureStageService, '#execute' do
let
(
:service
)
{
described_class
.
new
(
project
,
user
)
}
context
'when build has a stage assigned'
do
it
'does not create a new stage'
do
job
.
assign_attributes
(
stage_id:
stage
.
id
)
it
'does not create a new stage'
do
job
.
assign_attributes
(
stage_id:
stage
.
id
)
expect
{
service
.
execute
(
job
)
}.
not_to
change
{
Ci
::
Stage
.
count
}
end
expect
{
service
.
execute
(
job
)
}.
not_to
change
{
Ci
::
Stage
.
count
}
end
end
context
'when build does not have a stage assigned'
do
it
'creates a new stage'
do
job
.
assign_attributes
(
stage_id:
nil
,
stage:
'test'
)
it
'creates a new stage'
do
job
.
assign_attributes
(
stage_id:
nil
,
stage:
'test'
)
expect
{
service
.
execute
(
job
)
}.
to
change
{
Ci
::
Stage
.
count
}.
by
(
1
)
end
expect
{
service
.
execute
(
job
)
}.
to
change
{
Ci
::
Stage
.
count
}.
by
(
1
)
end
end
context
'when build is invalid'
do
it
'does not create a new stage'
do
job
.
assign_attributes
(
stage_id:
nil
,
ref:
nil
)
it
'does not create a new stage'
do
job
.
assign_attributes
(
stage_id:
nil
,
ref:
nil
)
expect
{
service
.
execute
(
job
)
}.
not_to
change
{
Ci
::
Stage
.
count
}
end
expect
{
service
.
execute
(
job
)
}.
not_to
change
{
Ci
::
Stage
.
count
}
end
end
context
'when new stage can not be created because of an exception'
do
...
...
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