Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-11-17 19:27:38 +0300
committerWinnie Hellmann <winnie@gitlab.com>2017-11-20 13:20:02 +0300
commit17fe8174a27e8fb5f5f4bbfce0be454bea943bf3 (patch)
tree20024420503192766a97d3428f130effafd26340 /spec
parentdc18038a37347e77f037bd3712296f91daaef859 (diff)
Merge branch 'bvl-fix-count-with-selects' into 'master'
Remove the selects when counting the last page Closes #40266 See merge request gitlab-org/gitlab-ce!15456 (cherry picked from commit c406824d319e5b1a073af7cf55c3f24bfa66e2a4) 5a335c4d Remove the selects when counting the last page
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/groups/children_controller_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/controllers/groups/children_controller_spec.rb b/spec/controllers/groups/children_controller_spec.rb
index 4262d474e59..cb1b460fc0e 100644
--- a/spec/controllers/groups/children_controller_spec.rb
+++ b/spec/controllers/groups/children_controller_spec.rb
@@ -280,6 +280,17 @@ describe Groups::ChildrenController do
expect(assigns(:children)).to contain_exactly(other_subgroup, *next_page_projects.take(per_page - 1))
end
+
+ context 'with a mixed first page' do
+ let!(:first_page_subgroups) { [create(:group, :public, parent: group)] }
+ let!(:first_page_projects) { create_list(:project, per_page, :public, namespace: group) }
+
+ it 'correctly calculates the counts' do
+ get :index, group_id: group.to_param, sort: 'id_asc', page: 2, format: :json
+
+ expect(response).to have_gitlab_http_status(200)
+ end
+ end
end
end
end