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
iv
gitlab-ce
Commits
5dba7776
Commit
5dba7776
authored
Apr 20, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests
parent
b016d435
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
spec/features/merge_requests/cherry_pick_spec.rb
spec/features/merge_requests/cherry_pick_spec.rb
+44
-0
No files found.
spec/features/merge_requests/cherry_pick_spec.rb
0 → 100644
View file @
5dba7776
require
'spec_helper'
describe
'Cherry-pick Merge Requests'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:merge_request
)
{
create
(
:merge_request_with_diffs
,
source_project:
project
,
author:
user
)
}
before
do
login_as
user
project
.
team
<<
[
user
,
:master
]
end
context
"Viewing a merged merge request"
do
before
do
service
=
MergeRequests
::
MergeService
.
new
(
project
,
user
)
perform_enqueued_jobs
do
service
.
execute
(
merge_request
)
end
end
# Fast-forward merge, or merged before GitLab 8.5.
context
"Without a merge commit"
do
before
do
merge_request
.
merge_commit_sha
=
nil
merge_request
.
save
end
it
"doesn't show a Cherry-pick button"
do
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
expect
(
page
).
not_to
have_link
"Cherry-pick"
end
end
context
"With a merge commit"
do
it
"shows a Cherry-pick button"
do
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
expect
(
page
).
to
have_link
"Cherry-pick"
end
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