summaryrefslogtreecommitdiff
path: root/spec/controllers/projects_controller_spec.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-10-17 18:20:04 +0200
committerDouwe Maan <douwe@gitlab.com>2015-10-17 18:20:04 +0200
commit70240f433cd822a8d6f3a5d904c3447b8f19a34a (patch)
tree5bcd156870e243b342c0742e6f3d6b8f72c798de /spec/controllers/projects_controller_spec.rb
parentc5280434399ee489eebda254b2d246252df68f2b (diff)
parent5ad3a274b3404286bb32b695c8f2b7bdd21e4953 (diff)
downloadgitlab-ce-70240f433cd822a8d6f3a5d904c3447b8f19a34a.tar.gz
Merge branch 'master' into cristianbica/gitlab-ce-user-project-view-files
Diffstat (limited to 'spec/controllers/projects_controller_spec.rb')
-rw-r--r--spec/controllers/projects_controller_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb
index 1e018acf42a..590a3f5b441 100644
--- a/spec/controllers/projects_controller_spec.rb
+++ b/spec/controllers/projects_controller_spec.rb
@@ -46,6 +46,20 @@ describe ProjectsController do
expect(response).to render_template('_files')
end
end
+
+ context "when requested with case sensitive namespace and project path" do
+ it "redirects to the normalized path for case mismatch" do
+ get :show, namespace_id: public_project.namespace.path, id: public_project.path.upcase
+
+ expect(response).to redirect_to("/#{public_project.path_with_namespace}")
+ end
+
+ it "loads the page if normalized path matches request path" do
+ get :show, namespace_id: public_project.namespace.path, id: public_project.path
+
+ expect(response.status).to eq(200)
+ end
+ end
end
describe "POST #toggle_star" do