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
348e346d
Commit
348e346d
authored
Feb 05, 2019
by
Hiroyuki Sato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix false-positive spec
parent
74946c19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
spec/services/merge_requests/create_service_spec.rb
spec/services/merge_requests/create_service_spec.rb
+18
-18
No files found.
spec/services/merge_requests/create_service_spec.rb
View file @
348e346d
...
...
@@ -197,6 +197,24 @@ describe MergeRequests::CreateService do
expect
(
merge_request
.
actual_head_pipeline
).
to
be_merge_request
end
context
'when there are no commits between source branch and target branch'
do
let
(
:opts
)
do
{
title:
'Awesome merge_request'
,
description:
'please fix'
,
source_branch:
'not-merged-branch'
,
target_branch:
'master'
}
end
it
'does not create a merge request pipeline'
do
expect
(
merge_request
).
to
be_persisted
merge_request
.
reload
expect
(
merge_request
.
merge_request_pipelines
.
count
).
to
eq
(
0
)
end
end
context
"when branch pipeline was created before a merge request pipline has been created"
do
before
do
create
(
:ci_pipeline
,
project:
merge_request
.
source_project
,
...
...
@@ -226,24 +244,6 @@ describe MergeRequests::CreateService do
end
end
context
'when there are no commits between source branch and target branch'
do
let
(
:opts
)
do
{
title:
'Awesome merge_request'
,
description:
'please fix'
,
source_branch:
'not-merged-branch'
,
target_branch:
'master'
}
end
it
'does not create a merge request pipeline'
do
expect
(
merge_request
).
to
be_persisted
merge_request
.
reload
expect
(
merge_request
.
merge_request_pipelines
.
count
).
to
eq
(
0
)
end
end
context
"when .gitlab-ci.yml does not have merge_requests keywords"
do
let
(
:config
)
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