Commit 34586c18 authored by Katarzyna Kobierska's avatar Katarzyna Kobierska

Improve grammar

parent bef1292c
...@@ -98,7 +98,7 @@ module MergeRequestsHelper ...@@ -98,7 +98,7 @@ module MergeRequestsHelper
end end
def merge_request_button_visibility(merge_request, closed) def merge_request_button_visibility(merge_request, closed)
return 'hidden' if merge_request.can_reopen? return 'hidden' if merge_request.closed? == closed || (merge_request.merged? == closed && !merge_request.closed?) || merge_request.closed_without_fork?
end end
def merge_request_version_path(project, merge_request, merge_request_diff, start_sha = nil) def merge_request_version_path(project, merge_request, merge_request_diff, start_sha = nil)
......
...@@ -1101,7 +1101,7 @@ describe MergeRequest, models: true do ...@@ -1101,7 +1101,7 @@ describe MergeRequest, models: true do
expect(merge_request.reload.can_reopen?).to be_falsey expect(merge_request.reload.can_reopen?).to be_falsey
end end
it 'returnes false if the merge request is merged' do it 'returns false if the merge request is merged' do
merge_request.update_attributes(state: 'merged') merge_request.update_attributes(state: 'merged')
expect(merge_request.reload.can_reopen?).to be_falsey expect(merge_request.reload.can_reopen?).to be_falsey
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment