diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-07-18 21:26:30 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-07-18 21:26:30 +0000 |
commit | ec31b616982f137abdee8d0c6aa9dc4a6d103189 (patch) | |
tree | e4f5dc564be2b4ce5047a1f5acb2790fdc3b70ca /test/functional/auto_completes_controller_test.rb | |
parent | 1db54e228d98d20536133bf52a8af0ce67616dc3 (diff) | |
download | redmine-ec31b616982f137abdee8d0c6aa9dc4a6d103189.tar.gz redmine-ec31b616982f137abdee8d0c6aa9dc4a6d103189.zip |
Removes calls to #assert_template and #assigns in functional tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@15695 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/auto_completes_controller_test.rb')
-rw-r--r-- | test/functional/auto_completes_controller_test.rb | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/test/functional/auto_completes_controller_test.rb b/test/functional/auto_completes_controller_test.rb index 48a1c7758..5360eac9b 100644 --- a/test/functional/auto_completes_controller_test.rb +++ b/test/functional/auto_completes_controller_test.rb @@ -31,49 +31,43 @@ class AutoCompletesControllerTest < Redmine::ControllerTest def test_issues_should_not_be_case_sensitive get :issues, :project_id => 'ecookbook', :q => 'ReCiPe' assert_response :success - assert_not_nil assigns(:issues) - assert assigns(:issues).detect {|issue| issue.subject.match /recipe/} + assert_include "recipe", response.body end def test_issues_should_accept_term_param get :issues, :project_id => 'ecookbook', :term => 'ReCiPe' assert_response :success - assert_not_nil assigns(:issues) - assert assigns(:issues).detect {|issue| issue.subject.match /recipe/} + assert_include "recipe", response.body end def test_issues_should_return_issue_with_given_id get :issues, :project_id => 'subproject1', :q => '13' assert_response :success - assert_not_nil assigns(:issues) - assert assigns(:issues).include?(Issue.find(13)) + assert_include "Bug #13", response.body end def test_issues_should_return_issue_with_given_id_preceded_with_hash get :issues, :project_id => 'subproject1', :q => '#13' assert_response :success - assert_not_nil assigns(:issues) - assert assigns(:issues).include?(Issue.find(13)) + assert_include "Bug #13", response.body end def test_auto_complete_with_scope_all_should_search_other_projects get :issues, :project_id => 'ecookbook', :q => '13', :scope => 'all' assert_response :success - assert_not_nil assigns(:issues) - assert assigns(:issues).include?(Issue.find(13)) + assert_include "Bug #13", response.body end def test_auto_complete_without_project_should_search_all_projects get :issues, :q => '13' assert_response :success - assert_not_nil assigns(:issues) - assert assigns(:issues).include?(Issue.find(13)) + assert_include "Bug #13", response.body end def test_auto_complete_without_scope_all_should_not_search_other_projects get :issues, :project_id => 'ecookbook', :q => '13' assert_response :success - assert_equal [], assigns(:issues) + assert_not_include "Bug #13", response.body end def test_issues_should_return_json |