summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-10-01 08:13:40 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-10-01 08:13:40 +0000
commit7daa5b750fe657f662247868e8a8db89ee5b29a6 (patch)
tree0fe1b7158fd634cef8df5fc1b04e065a7061b358 /test
parent1673a9540bc7551d9b115673de524939b60689ba (diff)
downloadredmine-7daa5b750fe657f662247868e8a8db89ee5b29a6.tar.gz
redmine-7daa5b750fe657f662247868e8a8db89ee5b29a6.zip
Previous/Next navigation on a issue is not displayed on r15639 and later (#23781).
git-svn-id: http://svn.redmine.org/redmine/trunk@15850 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/integration/issues_test.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/integration/issues_test.rb b/test/integration/issues_test.rb
index c231eeb0e..2e8587d5a 100644
--- a/test/integration/issues_test.rb
+++ b/test/integration/issues_test.rb
@@ -109,6 +109,35 @@ class IssuesTest < Redmine::IntegrationTest
assert_equal 0, Issue.find(1).attachments.length
end
+ def test_next_and_previous_links_should_be_displayed_after_filter
+ with_settings :default_language => 'en' do
+ get '/projects/ecookbook/issues?set_filter=1&tracker_id=1'
+ assert_response :success
+ assert_select 'td.id', :text => '5'
+
+ get '/issues/5'
+ assert_response :success
+ assert_select '.next-prev-links .position', :text => '3 of 5'
+ end
+ end
+
+ def test_next_and_previous_links_should_be_displayed_after_saved_query
+ query = IssueQuery.create!(:name => 'Calendar Query',
+ :visibility => IssueQuery::VISIBILITY_PUBLIC,
+ :filters => {'tracker_id' => {:operator => '=', :values => ['1']}}
+ )
+
+ with_settings :default_language => 'en' do
+ get "/projects/ecookbook/issues?set_filter=1&query_id=#{query.id}"
+ assert_response :success
+ assert_select 'td.id', :text => '5'
+
+ get '/issues/5'
+ assert_response :success
+ assert_select '.next-prev-links .position', :text => '6 of 8'
+ end
+ end
+
def test_other_formats_links_on_index
get '/projects/ecookbook/issues'