summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-03-06 22:46:49 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-03-06 22:46:49 +0000
commitdc8b804eba9c2f08e1303db1ec9447c457a1386e (patch)
tree9bf9458ae09a9a3937b38e5849423cb127a83eec /test
parent009b685b1d64c0cbb6cf8c78dfd65ecc0b004d9a (diff)
downloadredmine-dc8b804eba9c2f08e1303db1ec9447c457a1386e.tar.gz
redmine-dc8b804eba9c2f08e1303db1ec9447c457a1386e.zip
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
Diffstat (limited to 'test')
-rw-r--r--test/integration/issues_test.rb39
1 files changed, 38 insertions, 1 deletions
diff --git a/test/integration/issues_test.rb b/test/integration/issues_test.rb
index 9f3c07f18..710fa5f76 100644
--- a/test/integration/issues_test.rb
+++ b/test/integration/issues_test.rb
@@ -88,5 +88,42 @@ class IssuesTest < ActionController::IntegrationTest
Issue.find(1).attachments.each(&:destroy)
assert_equal 0, Issue.find(1).attachments.length
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