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
1b547cfb
Commit
1b547cfb
authored
Sep 23, 2016
by
Katarzyna Kobierska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve grammar
parent
25edb070
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-1
spec/views/projects/merge_requests/show.html.haml_spec.rb
spec/views/projects/merge_requests/show.html.haml_spec.rb
+1
-1
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
1b547cfb
...
@@ -417,7 +417,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -417,7 +417,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
def
validates_merge_request
def
validates_merge_request
# If source project was removed and merge request for some reason
# If source project was removed and merge request for some reason
# wasn't close
(Ex. mr
from fork to origin) merge request will be closed
# wasn't close
d (Ex. MR
from fork to origin) merge request will be closed
if
!
@merge_request
.
source_project
&&
@merge_request
.
open?
if
!
@merge_request
.
source_project
&&
@merge_request
.
open?
@merge_request
.
close
@merge_request
.
close
end
end
...
...
spec/views/projects/merge_requests/show.html.haml_spec.rb
View file @
1b547cfb
...
@@ -43,7 +43,7 @@ describe 'projects/merge_requests/show.html.haml' do
...
@@ -43,7 +43,7 @@ describe 'projects/merge_requests/show.html.haml' do
end
end
context
'when the merge request is open'
do
context
'when the merge request is open'
do
it
'closes
open merge reque
st'
do
it
'closes
the merge request if the source project does not exi
st'
do
closed_merge_request
.
update_attributes
(
state:
'open'
)
closed_merge_request
.
update_attributes
(
state:
'open'
)
fork_project
.
destroy
fork_project
.
destroy
...
...
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