From 3eff27344b0bef7703ba248d0a2312bfca95c182 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Tue, 17 Aug 2010 15:03:58 +0000 Subject: Refactor: move IssuesController#auto_complete to a new controller. #4382 git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3945 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/auto_completes_controller_test.rb | 20 ++++++++++++++++++++ test/functional/issues_controller_test.rb | 14 -------------- 2 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 test/functional/auto_completes_controller_test.rb (limited to 'test/functional') diff --git a/test/functional/auto_completes_controller_test.rb b/test/functional/auto_completes_controller_test.rb new file mode 100644 index 000000000..25e75fc4b --- /dev/null +++ b/test/functional/auto_completes_controller_test.rb @@ -0,0 +1,20 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class AutoCompletesControllerTest < ActionController::TestCase + fixtures :all + + 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/} + 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)) + end + +end diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 0c1172f60..948cf8598 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -1123,20 +1123,6 @@ class IssuesControllerTest < ActionController::TestCase assert_not_nil assigns(:notes) end - def test_auto_complete_should_not_be_case_sensitive - get :auto_complete, :project_id => 'ecookbook', :q => 'ReCiPe' - assert_response :success - assert_not_nil assigns(:issues) - assert assigns(:issues).detect {|issue| issue.subject.match /recipe/} - end - - def test_auto_complete_should_return_issue_with_given_id - get :auto_complete, :project_id => 'subproject1', :q => '13' - assert_response :success - assert_not_nil assigns(:issues) - assert assigns(:issues).include?(Issue.find(13)) - end - def test_destroy_issue_with_no_time_entries assert_nil TimeEntry.find_by_issue_id(2) @request.session[:user_id] = 2 -- cgit v1.2.3