From 5d31eb2495c2c2cce3ab83867f0d2d01e5d1693c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 10 Jul 2016 16:47:49 +0000 Subject: [PATCH] Don't generate pagination links with params. git-svn-id: http://svn.redmine.org/redmine/trunk@15627 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/pagination.rb | 2 +- test/integration/issues_test.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/redmine/pagination.rb b/lib/redmine/pagination.rb index a28236a28..0457a4b68 100644 --- a/lib/redmine/pagination.rb +++ b/lib/redmine/pagination.rb @@ -145,7 +145,7 @@ module Redmine if block_given? yield text, parameters, options else - link_to text, params.merge(parameters), options + link_to text, {:params => request.query_parameters.merge(parameters)}, options end end end diff --git a/test/integration/issues_test.rb b/test/integration/issues_test.rb index fb8000204..5d94a57bc 100644 --- a/test/integration/issues_test.rb +++ b/test/integration/issues_test.rb @@ -135,11 +135,11 @@ class IssuesTest < Redmine::IntegrationTest end end - def test_pagination_links_on_index_without_project_id_in_url + def test_pagination_links_should_preserve_query_parameters with_settings :per_page_options => '2' do - get '/issues', :project_id => 'ecookbook' - - assert_select 'a[href=?]', '/projects/ecookbook/issues?page=2', :text => '2' + get '/projects/ecookbook/issues?foo=bar' + + assert_select 'a[href=?]', '/projects/ecookbook/issues?foo=bar&page=2', :text => '2' end end -- 2.39.5