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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
4bc5c66f
Commit
4bc5c66f
authored
Mar 01, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken `project_url` routing when protected branches are accessed with an empty repo
parent
4e5bc1d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
app/helpers/gitlab_routing_helper.rb
app/helpers/gitlab_routing_helper.rb
+16
-0
spec/controllers/projects/protected_branches_controller_spec.rb
...ontrollers/projects/protected_branches_controller_spec.rb
+10
-0
No files found.
app/helpers/gitlab_routing_helper.rb
View file @
4bc5c66f
...
...
@@ -28,4 +28,20 @@ module GitlabRoutingHelper
def
merge_request_path
(
entity
,
*
args
)
namespace_project_merge_request_path
(
entity
.
project
.
namespace
,
entity
.
project
,
entity
,
*
args
)
end
def
project_url
(
project
,
*
args
)
namespace_project_url
(
project
.
namespace
,
project
,
*
args
)
end
def
edit_project_url
(
project
,
*
args
)
edit_namespace_project_url
(
project
.
namespace
,
project
,
*
args
)
end
def
issue_url
(
entity
,
*
args
)
namespace_project_issue_url
(
entity
.
project
.
namespace
,
entity
.
project
,
entity
,
*
args
)
end
def
merge_request_url
(
entity
,
*
args
)
namespace_project_merge_request_url
(
entity
.
project
.
namespace
,
entity
.
project
,
entity
,
*
args
)
end
end
spec/controllers/projects/protected_branches_controller_spec.rb
0 → 100644
View file @
4bc5c66f
require
(
'spec_helper'
)
describe
Projects
::
ProtectedBranchesController
do
describe
"GET #index"
do
let
(
:project
)
{
create
(
:project_empty_repo
,
:public
)
}
it
"redirect empty repo to projects page"
do
get
(
:index
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
)
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