summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-01-21 09:59:12 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-01-21 09:59:12 +0000
commit4abc3179f588f03aba2e5c9d7a5fb29570dc2614 (patch)
treef2a00628a0075f11a0a6015b7b27cfe355bc16ad /test
parent402d73914634e0e0a2ec06cc94e7b3ec13275546 (diff)
downloadredmine-4abc3179f588f03aba2e5c9d7a5fb29570dc2614.tar.gz
redmine-4abc3179f588f03aba2e5c9d7a5fb29570dc2614.zip
Filter parent task issues in auto complete by open/closed status depending on the subtask status (#24877).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16243 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/auto_completes_controller_test.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/functional/auto_completes_controller_test.rb b/test/functional/auto_completes_controller_test.rb
index 5360eac9b..d02addc1a 100644
--- a/test/functional/auto_completes_controller_test.rb
+++ b/test/functional/auto_completes_controller_test.rb
@@ -81,4 +81,25 @@ class AutoCompletesControllerTest < Redmine::ControllerTest
assert_equal 13, issue['value']
assert_equal 'Bug #13: Subproject issue two', issue['label']
end
+
+ def test_auto_complete_with_status_o_should_return_open_issues_only
+ get :issues, :project_id => 'ecookbook', :q => 'issue', :status => 'o'
+ assert_response :success
+ assert_include "Issue due today", response.body
+ assert_not_include "closed", response.body
+ end
+
+ def test_auto_complete_with_status_c_should_return_closed_issues_only
+ get :issues, :project_id => 'ecookbook', :q => 'issue', :status => 'c'
+ assert_response :success
+ assert_include "closed", response.body
+ assert_not_include "Issue due today", response.body
+ end
+
+ def test_auto_complete_with_issue_id_should_not_return_that_issue
+ get :issues, :project_id => 'ecookbook', :q => 'issue', :issue_id => '12'
+ assert_response :success
+ assert_include "issue", response.body
+ assert_not_include "Bug #12: Closed issue on a locked version", response.body
+ end
end