Commit b7685b57 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Redirect to root path when visiting `/ci`

parent 6f894bec
......@@ -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)
......
.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 'redirects to /' do
expect(response).to redirect_to(root_path)
end
end
context 'user not signed in' do
before { get(:index) }
it 'returns 200' do
expect(response.status).to eq 200
it 'redirects to sign in page' do
expect(response).to redirect_to(new_user_session_path)
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment