diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-12-06 16:55:37 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-12-06 16:55:37 +0000 |
commit | bf934a8f7c506bea0b453690c7b0e79db7004afc (patch) | |
tree | 8885101dbfdee559c012591ef318e5d0602d9698 | |
parent | 102b32325da3fc93a1c99d05b20c853fc681df35 (diff) | |
parent | 4783f15a2dc1d6f42532e59ed68b5c7d9a7426f8 (diff) | |
download | gitlab-ce-bf934a8f7c506bea0b453690c7b0e79db7004afc.tar.gz |
Merge branch 'admin-welcome-new-group-link' into 'master'
Fixes admin welcome states new group path
Closes #40645
See merge request gitlab-org/gitlab-ce!15761
3 files changed, 21 insertions, 1 deletions
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 |