Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
69eba885
Commit
69eba885
authored
Oct 20, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure we render events for projects within a group
parent
490cce63
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
0 deletions
+41
-0
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+11
-0
changelogs/unreleased/bvl-fix-group-atom-feed.yml
changelogs/unreleased/bvl-fix-group-atom-feed.yml
+5
-0
spec/controllers/groups_controller_spec.rb
spec/controllers/groups_controller_spec.rb
+25
-0
No files found.
app/controllers/groups_controller.rb
View file @
69eba885
...
...
@@ -141,6 +141,17 @@ class GroupsController < Groups::ApplicationController
end
def
load_events
params
[
:sort
]
||=
'latest_activity_desc'
options
=
{}
options
[
:only_owned
]
=
true
if
params
[
:shared
]
==
'0'
options
[
:only_shared
]
=
true
if
params
[
:shared
]
==
'1'
@projects
=
GroupProjectsFinder
.
new
(
params:
params
,
group:
group
,
options:
options
,
current_user:
current_user
)
.
execute
.
includes
(
:namespace
)
.
page
(
params
[
:page
])
@events
=
EventCollection
.
new
(
@projects
,
offset:
params
[
:offset
].
to_i
,
filter:
event_filter
)
.
to_a
...
...
changelogs/unreleased/bvl-fix-group-atom-feed.yml
0 → 100644
View file @
69eba885
---
title
:
Fix the atom feed for group events
merge_request
:
14974
author
:
type
:
fixed
spec/controllers/groups_controller_spec.rb
View file @
69eba885
...
...
@@ -32,6 +32,31 @@ describe GroupsController do
end
end
describe
'GET #show'
do
before
do
sign_in
(
user
)
project
end
context
'as html'
do
it
'assigns whether or not a group has children'
do
get
:show
,
id:
group
.
to_param
expect
(
assigns
(
:has_children
)).
to
be_truthy
end
end
context
'as atom'
do
it
'assigns events for all the projects in the group'
do
create
(
:event
,
project:
project
)
get
:show
,
id:
group
.
to_param
,
format: :atom
expect
(
assigns
(
:events
)).
not_to
be_empty
end
end
end
describe
'GET #new'
do
context
'when creating subgroups'
,
:nested_groups
do
[
true
,
false
].
each
do
|
can_create_group_status
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment