summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-05-18 16:23:05 -0700
committerMichael Kozono <mkozono@gmail.com>2017-05-19 09:13:27 -0700
commit49697bc8df613dfe8e88f5f7cd8eae57e26c786f (patch)
treeda5888be64878d8b35d1727dc802d609960fd631 /spec/support
parentf9785dcec34c4205732871523f95b9743db00965 (diff)
downloadgitlab-ce-49697bc8df613dfe8e88f5f7cd8eae57e26c786f.tar.gz
Refactor to more robust implementationfix-issue-32506
In order to avoid string manipulation or modify route params (to make them unambiguous for `url_for`), we are accepting a behavior change: When being redirected to the canonical path for a group, if you requested a group show path starting with `/groups/…` then you’ll now be redirected to the group at root `/…`.
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/milestone_tabs_examples.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/milestone_tabs_examples.rb b/spec/support/milestone_tabs_examples.rb
index c69f8e11008..4ad8b0a16e1 100644
--- a/spec/support/milestone_tabs_examples.rb
+++ b/spec/support/milestone_tabs_examples.rb
@@ -1,7 +1,7 @@
shared_examples 'milestone tabs' do
def go(path, extra_params = {})
params = if milestone.is_a?(GlobalMilestone)
- { group_id: group.id, id: milestone.safe_title, title: milestone.title }
+ { group_id: group.to_param, id: milestone.safe_title, title: milestone.title }
else
{ namespace_id: project.namespace.to_param, project_id: project, id: milestone.iid }
end