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
Léo-Paul Géneau
gitlab-ce
Commits
9eedd6f9
Commit
9eedd6f9
authored
Oct 12, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve desc for pipeline integration spec in MWBS
parent
df404f55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
17 deletions
+19
-17
spec/services/merge_requests/merge_when_build_succeeds_service_spec.rb
.../merge_requests/merge_when_build_succeeds_service_spec.rb
+19
-17
No files found.
spec/services/merge_requests/merge_when_build_succeeds_service_spec.rb
View file @
9eedd6f9
...
...
@@ -98,7 +98,26 @@ describe MergeRequests::MergeWhenBuildSucceedsService do
service
.
trigger
(
unrelated_pipeline
)
end
end
end
describe
"#cancel"
do
before
do
service
.
cancel
(
mr_merge_if_green_enabled
)
end
it
"resets all the merge_when_build_succeeds params"
do
expect
(
mr_merge_if_green_enabled
.
merge_when_build_succeeds
).
to
be_falsey
expect
(
mr_merge_if_green_enabled
.
merge_params
).
to
eq
({})
expect
(
mr_merge_if_green_enabled
.
merge_user
).
to
be
nil
end
it
'Posts a system note'
do
note
=
mr_merge_if_green_enabled
.
notes
.
last
expect
(
note
.
note
).
to
include
'Canceled the automatic merge'
end
end
describe
'pipeline integration'
do
context
'when there are multiple stages in the pipeline'
do
let
(
:ref
)
{
mr_merge_if_green_enabled
.
source_branch
}
let
(
:sha
)
{
project
.
commit
(
ref
).
id
}
...
...
@@ -139,21 +158,4 @@ describe MergeRequests::MergeWhenBuildSucceedsService do
end
end
end
describe
"#cancel"
do
before
do
service
.
cancel
(
mr_merge_if_green_enabled
)
end
it
"resets all the merge_when_build_succeeds params"
do
expect
(
mr_merge_if_green_enabled
.
merge_when_build_succeeds
).
to
be_falsey
expect
(
mr_merge_if_green_enabled
.
merge_params
).
to
eq
({})
expect
(
mr_merge_if_green_enabled
.
merge_user
).
to
be
nil
end
it
'Posts a system note'
do
note
=
mr_merge_if_green_enabled
.
notes
.
last
expect
(
note
.
note
).
to
include
'Canceled the automatic merge'
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