Commit 454e9631 authored by James Gregory's avatar James Gregory

The admin user projects view now has a clickable group link

parent a1556200
......@@ -7,7 +7,7 @@
%ul.well-list
- @user.groups.each do |group|
%li
%strong= group.name
%strong= link_to group.name, admin_group_path(group)
– access to
#{pluralize(group.projects.count, 'project')}
......
---
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
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
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