Prepare admin/projects/show view to allow EE specific feature

In EE it will render a Geo Status widget when Geo is enabled and it is
in a secondary node.

Also added minimal specs to that action.
This commit is contained in:
Gabriel Mazetto 2018-10-01 23:50:48 -03:00
parent 1a90632cc9
commit 7b8b2563c4
2 changed files with 13 additions and 0 deletions

View File

@ -112,6 +112,8 @@
= visibility_level_icon(@project.visibility_level)
= visibility_level_label(@project.visibility_level)
= render_if_exists 'admin/projects/geo_status_widget', locals: { project: @project }
.card
.card-header
Transfer project

View File

@ -42,4 +42,15 @@ describe Admin::ProjectsController do
expect { get :index }.not_to exceed_query_limit(control_count)
end
end
describe 'GET /projects/:id' do
render_views
it 'renders show page' do
get :show, namespace_id: project.namespace.path, id: project.path
expect(response).to have_gitlab_http_status(200)
expect(response.body).to match(project.name)
end
end
end