summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-08 18:21:00 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-08 18:21:00 +0000
commit417219bfc49fd0d2ec725c27bbc57d960e8b699b (patch)
tree2246d6ac7127aee0c49825a7ae01f17f8b27057c /test/functional
parent381319c4e8eae9afc849d7ee6011c24481d94b4c (diff)
downloadredmine-417219bfc49fd0d2ec725c27bbc57d960e8b699b.tar.gz
redmine-417219bfc49fd0d2ec725c27bbc57d960e8b699b.zip
Fixed: error when displaying an issue with a query sorted by an association, eg. priority (#9936).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8569 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/issues_controller_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index c6b96cb3e..22ee54739 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -947,6 +947,20 @@ class IssuesControllerTest < ActionController::TestCase
assert_tag 'a', :attributes => {:href => '/issues/5'}, :content => /Next/
end
+ def test_show_should_display_prev_next_links_with_query_and_sort_on_association
+ @request.session[:query] = {:filters => {'status_id' => {:values => [''], :operator => 'o'}}, :project_id => nil}
+
+ %w(project tracker status priority author assigned_to category fixed_version).each do |assoc_sort|
+ @request.session['issues_index_sort'] = assoc_sort
+
+ get :show, :id => 3
+ assert_response :success, "Wrong response status for #{assoc_sort} sort"
+
+ assert_tag 'a', :content => /Previous/
+ assert_tag 'a', :content => /Next/
+ end
+ end
+
def test_show_should_display_prev_next_links_with_project_query_in_session
@request.session[:query] = {:filters => {'status_id' => {:values => [''], :operator => 'o'}}, :project_id => 1}
@request.session['issues_index_sort'] = 'id'