Fixed: export links on the issue list lose project param after applying a filter (#2908).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2554 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
009b685b1d
commit
dc8b804eba
@ -46,9 +46,9 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% other_formats_links do |f| %>
|
<% other_formats_links do |f| %>
|
||||||
<%= f.link_to 'Atom', :url => {:query_id => (@query.new_record? ? nil : @query), :key => User.current.rss_key} %>
|
<%= f.link_to 'Atom', :url => { :project_id => @project, :query_id => (@query.new_record? ? nil : @query), :key => User.current.rss_key } %>
|
||||||
<%= f.link_to 'CSV' %>
|
<%= f.link_to 'CSV', :url => { :project_id => @project } %>
|
||||||
<%= f.link_to 'PDF' %>
|
<%= f.link_to 'PDF', :url => { :project_id => @project } %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -89,4 +89,41 @@ class IssuesTest < ActionController::IntegrationTest
|
|||||||
assert_equal 0, Issue.find(1).attachments.length
|
assert_equal 0, Issue.find(1).attachments.length
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_other_formats_links_on_get_index
|
||||||
|
get '/projects/ecookbook/issues'
|
||||||
|
|
||||||
|
%w(Atom PDF CSV).each do |format|
|
||||||
|
assert_tag :a, :content => format,
|
||||||
|
:attributes => { :href => "/projects/ecookbook/issues.#{format.downcase}",
|
||||||
|
:rel => 'nofollow' }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_other_formats_links_on_post_index_without_project_id_in_url
|
||||||
|
post '/issues', :project_id => 'ecookbook'
|
||||||
|
|
||||||
|
%w(Atom PDF CSV).each do |format|
|
||||||
|
assert_tag :a, :content => format,
|
||||||
|
:attributes => { :href => "/projects/ecookbook/issues.#{format.downcase}",
|
||||||
|
:rel => 'nofollow' }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_pagination_links_on_get_index
|
||||||
|
Setting.per_page_options = '2'
|
||||||
|
get '/projects/ecookbook/issues'
|
||||||
|
|
||||||
|
assert_tag :a, :content => '2',
|
||||||
|
:attributes => { :href => '/projects/ecookbook/issues?page=2' }
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_pagination_links_on_post_index_without_project_id_in_url
|
||||||
|
Setting.per_page_options = '2'
|
||||||
|
post '/issues', :project_id => 'ecookbook'
|
||||||
|
|
||||||
|
assert_tag :a, :content => '2',
|
||||||
|
:attributes => { :href => '/projects/ecookbook/issues?page=2' }
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user