summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-03-19 09:00:36 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-03-19 09:00:36 +0000
commit17ea1539ef03607a1dfac792e43fe7c2c9c8bf7d (patch)
tree6d382a557e61293f0aef2b6d7bea65d8ca912a1b /test
parent5d9b87de3a9df6fcb256efa5f2274845b6050085 (diff)
downloadredmine-17ea1539ef03607a1dfac792e43fe7c2c9c8bf7d.tar.gz
redmine-17ea1539ef03607a1dfac792e43fe7c2c9c8bf7d.zip
Previous/next links may be lost after editing the issue (#14462).
git-svn-id: http://svn.redmine.org/redmine/trunk@15253 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/issues_controller_test.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index ae6eb4feb..7679195bb 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -1423,6 +1423,17 @@ class IssuesControllerTest < ActionController::TestCase
end
end
+ def test_show_should_display_prev_next_links_when_request_has_previous_and_next_issue_ids_params
+ get :show, :id => 1, :prev_issue_id => 1, :next_issue_id => 3, :issue_position => 2, :issue_count => 4
+ assert_response :success
+
+ assert_select 'div.next-prev-links' do
+ assert_select 'a[href="/issues/1"]', :text => /Previous/
+ assert_select 'a[href="/issues/3"]', :text => /Next/
+ assert_select 'span.position', :text => "2 of 4"
+ end
+ end
+
def test_show_should_display_category_field_if_categories_are_defined
Issue.update_all :category_id => nil
@@ -3681,6 +3692,19 @@ class IssuesControllerTest < ActionController::TestCase
assert_response :redirect
assert_redirected_to :controller => 'issues', :action => 'show', :id => issue.id
end
+
+ def test_put_update_should_redirect_with_previous_and_next_issue_ids_params
+ @request.session[:user_id] = 2
+
+ put :update, :id => 11,
+ :issue => {:status_id => 6, :notes => 'Notes'},
+ :prev_issue_id => 8,
+ :next_issue_id => 12,
+ :issue_position => 2,
+ :issue_count => 3
+
+ assert_redirected_to '/issues/11?issue_count=3&issue_position=2&next_issue_id=12&prev_issue_id=8'
+ end
def test_get_bulk_edit
@request.session[:user_id] = 2