diff options
author | Rémy Coutable <remy@rymai.me> | 2018-01-31 10:57:11 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-01-31 10:57:11 +0000 |
commit | f8250f8fd0cfec10a639b8a010331197a9e1c40e (patch) | |
tree | 651216ee5f425ba88cf1ec3faf1643634f9d0105 | |
parent | bebb9c0c6d478e267b5b79bb9c6146ed519f6f20 (diff) | |
parent | 30e6cfa05a361cbdc12ddb7c12061f4c7221c61b (diff) | |
download | gitlab-ce-f8250f8fd0cfec10a639b8a010331197a9e1c40e.tar.gz |
Merge branch 'sh-fix-events-collection' into 'master'
Fix not all events being shown in group dashboard
Closes #42560
See merge request gitlab-org/gitlab-ce!16819
-rw-r--r-- | app/controllers/groups_controller.rb | 1 | ||||
-rw-r--r-- | changelogs/unreleased/sh-fix-events-collection.yml | 5 | ||||
-rw-r--r-- | spec/controllers/groups_controller_spec.rb | 24 |
3 files changed, 29 insertions, 1 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index eb53a522f90..75270a0889b 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -150,7 +150,6 @@ class GroupsController < Groups::ApplicationController @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) diff --git a/changelogs/unreleased/sh-fix-events-collection.yml b/changelogs/unreleased/sh-fix-events-collection.yml new file mode 100644 index 00000000000..50af39d9caf --- /dev/null +++ b/changelogs/unreleased/sh-fix-events-collection.yml @@ -0,0 +1,5 @@ +--- +title: Fix not all events being shown in group dashboard +merge_request: +author: +type: fixed diff --git a/spec/controllers/groups_controller_spec.rb b/spec/controllers/groups_controller_spec.rb index a9cfd964dd5..492fed42d31 100644 --- a/spec/controllers/groups_controller_spec.rb +++ b/spec/controllers/groups_controller_spec.rb @@ -85,6 +85,30 @@ describe GroupsController do end end + describe 'GET #activity' do + render_views + + before do + sign_in(user) + project + end + + context 'as json' do + it 'includes all projects in event feed' do + 3.times do + project = create(:project, group: group) + create(:event, project: project) + end + + get :activity, id: group.to_param, format: :json + + expect(response).to have_gitlab_http_status(200) + expect(json_response['count']).to eq(3) + expect(assigns(:projects).limit_value).to be_nil + end + end + end + describe 'POST #create' do context 'when creating subgroups', :nested_groups do [true, false].each do |can_create_group_status| |