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
Jérome Perrin
gitlab-ce
Commits
057a8b70
Commit
057a8b70
authored
Sep 26, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for head pipeline assignment when skipped
Closes gitlab-org/gitlab-ce#34415
parent
835bdcb8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
spec/services/ci/create_pipeline_service_spec.rb
spec/services/ci/create_pipeline_service_spec.rb
+20
-0
No files found.
spec/services/ci/create_pipeline_service_spec.rb
View file @
057a8b70
...
...
@@ -133,6 +133,26 @@ describe Ci::CreatePipelineService do
expect
(
merge_request
.
reload
.
head_pipeline
).
to
eq
head_pipeline
end
end
context
'when pipeline has been skipped'
do
before
do
allow_any_instance_of
(
Ci
::
Pipeline
)
.
to
receive
(
:git_commit_message
)
.
and_return
(
'some commit [ci skip]'
)
end
it
'updates merge request head pipeline'
do
merge_request
=
create
(
:merge_request
,
source_branch:
'master'
,
target_branch:
'feature'
,
source_project:
project
)
head_pipeline
=
execute_service
expect
(
head_pipeline
).
to
be_skipped
expect
(
head_pipeline
).
to
be_persisted
expect
(
merge_request
.
reload
.
head_pipeline
).
to
eq
head_pipeline
end
end
end
context
'auto-cancel enabled'
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