diff --git a/app/views/dashboard/projects/_blank_state_admin_welcome.html.haml b/app/views/dashboard/projects/_blank_state_admin_welcome.html.haml index 573a4b93d67..c50b20a83dc 100644 --- a/app/views/dashboard/projects/_blank_state_admin_welcome.html.haml +++ b/app/views/dashboard/projects/_blank_state_admin_welcome.html.haml @@ -10,7 +10,7 @@ Projects are where you store your code, access issues, wiki and other features of GitLab. - if current_user.can_create_group? - = link_to admin_root_path, class: "blank-state-link" do + = link_to new_group_path, class: "blank-state-link" do .blank-state .blank-state-icon = custom_icon("add_new_group", size: 50) diff --git a/changelogs/unreleased/admin-welcome-new-group-link.yml b/changelogs/unreleased/admin-welcome-new-group-link.yml new file mode 100644 index 00000000000..9c939a0a3ad --- /dev/null +++ b/changelogs/unreleased/admin-welcome-new-group-link.yml @@ -0,0 +1,5 @@ +--- +title: Fixed admin welcome screen new group path +merge_request: +author: +type: fixed diff --git a/spec/views/dashboard/projects/_blank_state_admin_welcome.haml.rb b/spec/views/dashboard/projects/_blank_state_admin_welcome.haml.rb new file mode 100644 index 00000000000..2f58eec86dc --- /dev/null +++ b/spec/views/dashboard/projects/_blank_state_admin_welcome.haml.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe 'dashboard/projects/_blank_state_admin_welcome.html.haml' do + let(:user) { create(:admin) } + + before do + allow(view).to receive(:current_user).and_return(user) + end + + it 'links to new group path' do + render + + expect(rendered).to have_link('Create a group', href: new_group_path) + end +end