summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-08-17 15:03:58 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-08-17 15:03:58 +0000
commit3eff27344b0bef7703ba248d0a2312bfca95c182 (patch)
treeeefbe2247a166db315bf278b75300a959df00936 /test/functional
parente63acb70ca82d0c62476c92bbe815330ee01ad93 (diff)
downloadredmine-3eff27344b0bef7703ba248d0a2312bfca95c182.tar.gz
redmine-3eff27344b0bef7703ba248d0a2312bfca95c182.zip
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
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/auto_completes_controller_test.rb20
-rw-r--r--test/functional/issues_controller_test.rb14
2 files changed, 20 insertions, 14 deletions
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