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
41e0029c
Commit
41e0029c
authored
May 24, 2017
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move spec and add one for merge button not disabled.
parent
0eaa65d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
spec/features/merge_requests/widget_spec.rb
spec/features/merge_requests/widget_spec.rb
+29
-0
No files found.
spec/features/merge_requests/widget_spec.rb
View file @
41e0029c
...
...
@@ -206,4 +206,33 @@ describe 'Merge request', :feature, :js do
end
end
end
context
'user can merge into source project but cannot push to fork'
,
js:
true
do
let
(
:fork_project
)
{
create
(
:project
,
:public
)
}
let!
(
:merge_request_from_fork
)
do
create
(
:forked_project_link
,
forked_to_project:
fork_project
,
forked_from_project:
project
)
create
(
:merge_request_with_diffs
,
source_project:
fork_project
,
target_project:
project
)
end
let
(
:user2
)
{
create
(
:user
)
}
before
do
project
.
team
<<
[
user2
,
:master
]
logout
login_as
user2
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request_from_fork
)
end
it
'user can merge into the source project'
do
expect
(
page
).
to
have_button
(
'Merge'
,
disabled:
false
)
end
it
'user cannot remove source branch'
do
expect
(
page
).
to
have_field
(
'remove-source-branch-input'
,
disabled:
true
)
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