The admin user projects view now has a clickable group link
This commit is contained in:
parent
a155620042
commit
454e963196
|
@ -7,7 +7,7 @@
|
||||||
%ul.well-list
|
%ul.well-list
|
||||||
- @user.groups.each do |group|
|
- @user.groups.each do |group|
|
||||||
%li
|
%li
|
||||||
%strong= group.name
|
%strong= link_to group.name, admin_group_path(group)
|
||||||
– access to
|
– access to
|
||||||
#{pluralize(group.projects.count, 'project')}
|
#{pluralize(group.projects.count, 'project')}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
title: The admin user projects view now has a clickable group link
|
||||||
|
merge_request: 7620
|
||||||
|
author: James Gregory
|
|
@ -225,4 +225,32 @@ describe "Admin::Users", feature: true do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "GET /admin/users/:id/projects" do
|
||||||
|
before do
|
||||||
|
@group = create(:group)
|
||||||
|
@project = create(:project, group: @group)
|
||||||
|
@simple_user = create(:user)
|
||||||
|
@group.add_developer(@simple_user)
|
||||||
|
|
||||||
|
visit projects_admin_user_path(@simple_user)
|
||||||
|
end
|
||||||
|
|
||||||
|
it "lists group projects" do
|
||||||
|
within(:css, '.append-bottom-default + .panel') do
|
||||||
|
expect(page).to have_content 'Group projects'
|
||||||
|
expect(page).to have_link @group.name, admin_group_path(@group)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'allows navigation to the group details' do
|
||||||
|
within(:css, '.append-bottom-default + .panel') do
|
||||||
|
click_link @group.name
|
||||||
|
end
|
||||||
|
within(:css, 'h3.page-title') do
|
||||||
|
expect(page).to have_content "Group: #{@group.name}"
|
||||||
|
end
|
||||||
|
expect(page).to have_content @project.name
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue