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
ff1e730b
Commit
ff1e730b
authored
May 07, 2020
by
John Hope
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Subgroup links should use the subgroup full path
parent
7c4295a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
app/helpers/milestones_helper.rb
app/helpers/milestones_helper.rb
+1
-1
spec/helpers/milestones_helper_spec.rb
spec/helpers/milestones_helper_spec.rb
+15
-0
No files found.
app/helpers/milestones_helper.rb
View file @
ff1e730b
...
...
@@ -249,7 +249,7 @@ module MilestonesHelper
if
milestone
.
legacy_group_milestone?
group_milestone_path
(
@group
,
milestone
.
safe_title
,
title:
milestone
.
title
,
milestone:
params
)
else
group_milestone_path
(
@
group
,
milestone
.
iid
,
milestone:
params
)
group_milestone_path
(
milestone
.
group
,
milestone
.
iid
,
milestone:
params
)
end
end
...
...
spec/helpers/milestones_helper_spec.rb
View file @
ff1e730b
...
...
@@ -85,4 +85,19 @@ describe MilestonesHelper do
end
end
end
describe
"#group_milestone_route"
do
let
(
:group
)
{
build_stubbed
(
:group
)
}
let
(
:subgroup
)
{
build_stubbed
(
:group
,
parent:
group
,
name:
"Test Subgrp"
)
}
context
"when in subgroup"
do
let
(
:milestone
)
{
build_stubbed
(
:group_milestone
,
group:
subgroup
)
}
it
'generates correct url despite assigned @group'
do
assign
(
:group
,
group
)
milestone_path
=
"/groups/
#{
subgroup
.
full_path
}
/-/milestones/
#{
milestone
.
iid
}
"
expect
(
helper
.
group_milestone_route
(
milestone
)).
to
eq
(
milestone_path
)
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