Redirect to root path when visiting `/ci`
This commit is contained in:
parent
6f894bec09
commit
b7685b57d3
|
@ -6,6 +6,10 @@ module Ci
|
|||
skip_before_action :authenticate_user!, only: [:badge]
|
||||
protect_from_forgery
|
||||
|
||||
def index
|
||||
redirect_to root_path
|
||||
end
|
||||
|
||||
def show
|
||||
# Temporary compatibility with CI badges pointing to CI project page
|
||||
redirect_to namespace_project_path(project.namespace, project)
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
.wiki
|
||||
%h1
|
||||
GitLab CI is now integrated in GitLab UI
|
||||
%h2 For existing projects
|
||||
|
||||
%p
|
||||
Check the following pages to find the CI status you're looking for:
|
||||
|
||||
%ul
|
||||
%li Projects page - shows CI status for each project.
|
||||
%li Project commits page - show CI status for each commit.
|
||||
|
||||
|
||||
|
||||
%h2 For new projects
|
||||
|
||||
%p
|
||||
If you want to enable CI for a new project it is easy as adding
|
||||
= link_to ".gitlab-ci.yml", "http://doc.gitlab.com/ce/ci/yaml/README.html"
|
||||
file to your repository
|
|
@ -6,12 +6,23 @@ describe Ci::ProjectsController do
|
|||
let(:ci_id) { project.ci_id }
|
||||
|
||||
describe '#index' do
|
||||
let(:user) { create(:user) }
|
||||
before { sign_in(user) }
|
||||
before { get(:index) }
|
||||
context 'user signed in' do
|
||||
before do
|
||||
sign_in(create(:user))
|
||||
get(:index)
|
||||
end
|
||||
|
||||
it 'returns 200' do
|
||||
expect(response.status).to eq 200
|
||||
it 'redirects to /' do
|
||||
expect(response).to redirect_to(root_path)
|
||||
end
|
||||
end
|
||||
|
||||
context 'user not signed in' do
|
||||
before { get(:index) }
|
||||
|
||||
it 'redirects to sign in page' do
|
||||
expect(response).to redirect_to(new_user_session_path)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue