Commit 68453632 authored by Valery Sizov's avatar Valery Sizov

Fix: Admin group show page does not work

parent b93c72e3
......@@ -9,7 +9,7 @@ class Admin::GroupsController < Admin::ApplicationController
end
def show
@group = Group.with_statistics.find_by_full_path(params[:id])
@group = Group.with_statistics.joins(:route).group('routes.path').find_by_full_path(params[:id])
@members = @group.members.order("access_level DESC").page(params[:members_page])
@requesters = AccessRequestsFinder.new(@group).execute(current_user)
@projects = @group.projects.with_statistics.page(params[:projects_page])
......
......@@ -17,6 +17,16 @@ feature 'Admin Groups', feature: true do
end
end
describe 'show a group' do
scenario 'shows the group' do
group = create(:group, :private)
visit admin_group_path(group)
expect(page).to have_content("Group: #{group.name}")
end
end
describe 'group edit' do
scenario 'shows the visibility level radio populated with the group visibility_level value' do
group = create(:group, :private)
......
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