Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2017-02-03 16:00:26 +0300
committerblackst0ne <blackst0ne.ru@gmail.com>2017-02-03 16:00:26 +0300
commit63dac85385c6f82db6c6465876d76f67173ebc3b (patch)
tree69cca8082e1710826cd0f9f815fa44a04b9cb25f /spec
parentfd46fb1cd9cc1fdf826d31261aa594baa38d4898 (diff)
Fixed redirection from http://someproject.git to http://someproject
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/projects_controller_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb
index 9323f723bdb..e7aa8745b99 100644
--- a/spec/controllers/projects_controller_spec.rb
+++ b/spec/controllers/projects_controller_spec.rb
@@ -213,6 +213,17 @@ describe ProjectsController do
expect(response.status).to eq 404
end
end
+
+ context "redirection from http://someproject.git" do
+ it 'redirects to project page (format.html)' do
+ project = create(:project, :public)
+
+ get :show, namespace_id: project.namespace.path, id: project.path, format: :git
+
+ expect(response).to have_http_status(302)
+ expect(response).to redirect_to(namespace_project_path)
+ end
+ end
end
describe "#update" do