diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-01-30 18:28:59 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-01-30 18:28:59 +0300 |
commit | b886a75dab6566a6a0250d1cc0e3b93f5d0ccfca (patch) | |
tree | 0379ed83a40cf11586f5a99e2824ef10b1670921 /spec | |
parent | 7f647f9fef818a55975512b17615d09826c0f354 (diff) | |
parent | b02a6bed85000db63189b68fe8ce6154c283bc39 (diff) |
Merge branch 'jprovazn-pagination' into 'master'
Make pagination optional for issuables
See merge request gitlab-org/gitlab-ce!16774
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/projects/issues_controller_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/controllers/projects/issues_controller_spec.rb b/spec/controllers/projects/issues_controller_spec.rb index 4a2998b4ccd..9656e7f7e74 100644 --- a/spec/controllers/projects/issues_controller_spec.rb +++ b/spec/controllers/projects/issues_controller_spec.rb @@ -102,6 +102,18 @@ describe Projects::IssuesController do expect(response).to redirect_to(namespace_project_issues_path(page: last_page, state: controller.params[:state], scope: controller.params[:scope])) end + + it 'does not use pagination if disabled' do + allow(controller).to receive(:pagination_disabled?).and_return(true) + + get :index, + namespace_id: project.namespace.to_param, + project_id: project, + page: (last_page + 1).to_param + + expect(response).to have_gitlab_http_status(200) + expect(assigns(:issues).size).to eq(2) + end end end |