From 4c82fbb6f88aa59fa702af52daca524ac69f8d47 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 11 Apr 2012 17:21:35 +0000 Subject: [PATCH] Merged r9382 from trunk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@9383 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/views/other_formats_builder.rb | 2 +- test/functional/issues_controller_test.rb | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/redmine/views/other_formats_builder.rb b/lib/redmine/views/other_formats_builder.rb index 71eb1e09c..8e0a59861 100644 --- a/lib/redmine/views/other_formats_builder.rb +++ b/lib/redmine/views/other_formats_builder.rb @@ -23,7 +23,7 @@ module Redmine end def link_to(name, options={}) - url = { :format => name.to_s.downcase }.merge(options.delete(:url) || {}) + url = { :format => name.to_s.downcase }.merge(options.delete(:url) || {}).except('page') caption = options.delete(:caption) || name html_options = { :class => name.to_s.downcase, :rel => 'nofollow' }.merge(options) @view.content_tag('span', @view.link_to(caption, url, html_options)) diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 217d6e68f..f39d3d091 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -305,6 +305,15 @@ class IssuesControllerTest < ActionController::TestCase assert_response :success end + def test_index_should_omit_page_param_in_export_links + get :index, :page => 2 + assert_response :success + assert_select 'a.atom[href=/issues.atom]' + assert_select 'a.csv[href=/issues.csv]' + assert_select 'a.pdf[href=/issues.pdf]' + assert_select 'form#csv-export-form[action=/issues.csv]' + end + def test_index_csv get :index, :format => 'csv' assert_response :success -- 2.39.5