##// END OF EJS Templates
Fixed: export links on the issue list lose project param after applying a filter (#2908)....
Jean-Philippe Lang -
r2486:dc8b804eba9c
parent child
Show More
@@ -46,9 +46,9
46 <% end %>
46 <% end %>
47
47
48 <% other_formats_links do |f| %>
48 <% other_formats_links do |f| %>
49 <%= f.link_to 'Atom', :url => {:query_id => (@query.new_record? ? nil : @query), :key => User.current.rss_key} %>
49 <%= f.link_to 'Atom', :url => { :project_id => @project, :query_id => (@query.new_record? ? nil : @query), :key => User.current.rss_key } %>
50 <%= f.link_to 'CSV' %>
50 <%= f.link_to 'CSV', :url => { :project_id => @project } %>
51 <%= f.link_to 'PDF' %>
51 <%= f.link_to 'PDF', :url => { :project_id => @project } %>
52 <% end %>
52 <% end %>
53
53
54 <% end %>
54 <% end %>
@@ -88,5 +88,42 class IssuesTest < ActionController::IntegrationTest
88 Issue.find(1).attachments.each(&:destroy)
88 Issue.find(1).attachments.each(&:destroy)
89 assert_equal 0, Issue.find(1).attachments.length
89 assert_equal 0, Issue.find(1).attachments.length
90 end
90 end
91
91
92 def test_other_formats_links_on_get_index
93 get '/projects/ecookbook/issues'
94
95 %w(Atom PDF CSV).each do |format|
96 assert_tag :a, :content => format,
97 :attributes => { :href => "/projects/ecookbook/issues.#{format.downcase}",
98 :rel => 'nofollow' }
99 end
100 end
101
102 def test_other_formats_links_on_post_index_without_project_id_in_url
103 post '/issues', :project_id => 'ecookbook'
104
105 %w(Atom PDF CSV).each do |format|
106 assert_tag :a, :content => format,
107 :attributes => { :href => "/projects/ecookbook/issues.#{format.downcase}",
108 :rel => 'nofollow' }
109 end
110 end
111
112 def test_pagination_links_on_get_index
113 Setting.per_page_options = '2'
114 get '/projects/ecookbook/issues'
115
116 assert_tag :a, :content => '2',
117 :attributes => { :href => '/projects/ecookbook/issues?page=2' }
118
119 end
120
121 def test_pagination_links_on_post_index_without_project_id_in_url
122 Setting.per_page_options = '2'
123 post '/issues', :project_id => 'ecookbook'
124
125 assert_tag :a, :content => '2',
126 :attributes => { :href => '/projects/ecookbook/issues?page=2' }
127
128 end
92 end
129 end
General Comments 0
You need to be logged in to leave comments. Login now