summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-10-02 10:10:11 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-10-02 10:10:11 +0000
commit10ac3a9c8b614f1e4b09be21e62b08fe1b2159a2 (patch)
treea162234320b7a492f344d6cd3e4f16dafec6885b /test/integration
parent9a092547fb4ed88771f4ef72382cc8577fef3b7c (diff)
downloadredmine-10ac3a9c8b614f1e4b09be21e62b08fe1b2159a2.tar.gz
redmine-10ac3a9c8b614f1e4b09be21e62b08fe1b2159a2.zip
Merged r15852 and r15863 (#23839).
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@15865 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/issues_test.rb41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/integration/issues_test.rb b/test/integration/issues_test.rb
index fb8000204..ef3660f33 100644
--- a/test/integration/issues_test.rb
+++ b/test/integration/issues_test.rb
@@ -111,6 +111,47 @@ class IssuesTest < Redmine::IntegrationTest
assert_equal 0, Issue.find(1).attachments.length
end
+ def test_next_and_previous_links_should_be_displayed_after_query_grouped_and_sorted_by_version
+ with_settings :default_language => 'en' do
+ get '/projects/ecookbook/issues?set_filter=1&group_by=fixed_version&sort=priority:desc,fixed_version,id'
+ assert_response :success
+ assert_select 'td.id', :text => '5'
+
+ get '/issues/5'
+ assert_response :success
+ assert_select '.next-prev-links .position', :text => '5 of 6'
+ end
+ 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'