diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-04-11 17:02:21 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-04-11 17:02:21 +0000 |
commit | 04e7b18869eed8824ffd33ebc69dc99e0aab13e0 (patch) | |
tree | 1fb6113cda67741a72e65ea7e97cba057d181e08 | |
parent | d88ffd11e20b9ba642e6bb08b73b1e459468283b (diff) | |
download | redmine-04e7b18869eed8824ffd33ebc69dc99e0aab13e0.tar.gz redmine-04e7b18869eed8824ffd33ebc69dc99e0aab13e0.zip |
Fixed that export links include page parameter.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9382 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | lib/redmine/views/other_formats_builder.rb | 2 | ||||
-rw-r--r-- | test/functional/issues_controller_test.rb | 9 |
2 files changed, 10 insertions, 1 deletions
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 9bb600eff..484880cc7 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 |