summaryrefslogtreecommitdiff
path: root/spec/routing
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-11-07 13:04:46 +0100
committerBob Van Landuyt <bob@vanlanduyt.co>2017-11-07 19:52:10 +0100
commit2414c69ee981cf6432e513dfdcf57a9badc5d51f (patch)
tree668a369dce88fd852d1601b8d5d223948d167071 /spec/routing
parente070e216c80efb897eb6c5a7d13872e4762205c1 (diff)
downloadgitlab-ce-2414c69ee981cf6432e513dfdcf57a9badc5d51f.tar.gz
Check redirecting with a querystring
Diffstat (limited to 'spec/routing')
-rw-r--r--spec/routing/group_routing_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/routing/group_routing_spec.rb b/spec/routing/group_routing_spec.rb
index 3e56d34bc9d..7a4c8304e62 100644
--- a/spec/routing/group_routing_spec.rb
+++ b/spec/routing/group_routing_spec.rb
@@ -74,6 +74,16 @@ describe "Groups", "routing" do
expect(request).to redirect_to("/groups/#{group_path}/-/milestones/#{milestone.id}/merge_requests")
end
end
+
+ context 'with a query string' do
+ it_behaves_like 'redirecting a legacy path', "/groups/complex.group-namegit/milestones?hello=world", "/groups/complex.group-namegit/-/milestones/?hello=world" do
+ let(:resource) { create(:group, parent: group, path: 'milestones') }
+ end
+
+ it_behaves_like 'redirecting a legacy path', "/groups/complex.group-namegit/milestones?milestones=/milestones", "/groups/complex.group-namegit/-/milestones/?milestones=/milestones" do
+ let(:resource) { create(:group, parent: group, path: 'milestones') }
+ end
+ end
end
describe 'edit' do