Fixed that export links include page parameter.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9382 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
d88ffd11e2
commit
04e7b18869
|
@ -23,7 +23,7 @@ module Redmine
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_to(name, options={})
|
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
|
caption = options.delete(:caption) || name
|
||||||
html_options = { :class => name.to_s.downcase, :rel => 'nofollow' }.merge(options)
|
html_options = { :class => name.to_s.downcase, :rel => 'nofollow' }.merge(options)
|
||||||
@view.content_tag('span', @view.link_to(caption, url, html_options))
|
@view.content_tag('span', @view.link_to(caption, url, html_options))
|
||||||
|
|
|
@ -305,6 +305,15 @@ class IssuesControllerTest < ActionController::TestCase
|
||||||
assert_response :success
|
assert_response :success
|
||||||
end
|
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
|
def test_index_csv
|
||||||
get :index, :format => 'csv'
|
get :index, :format => 'csv'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
|
Loading…
Reference in New Issue