Mercurial > hg > soundsoftware-site
comparison test/functional/auto_completes_controller_test.rb @ 117:af80e5618e9b redmine-1.1
* Update to Redmine 1.1-stable branch (Redmine SVN rev 4707)
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 12:53:21 +0000 |
parents | 1d32c0a0efbf |
children | cbb26bc654de |
comparison
equal
deleted
inserted
replaced
39:150ceac17a8d | 117:af80e5618e9b |
---|---|
1 require File.dirname(__FILE__) + '/../test_helper' | 1 require File.expand_path('../../test_helper', __FILE__) |
2 | 2 |
3 class AutoCompletesControllerTest < ActionController::TestCase | 3 class AutoCompletesControllerTest < ActionController::TestCase |
4 fixtures :all | 4 fixtures :all |
5 | 5 |
6 def test_issues_should_not_be_case_sensitive | 6 def test_issues_should_not_be_case_sensitive |
15 assert_response :success | 15 assert_response :success |
16 assert_not_nil assigns(:issues) | 16 assert_not_nil assigns(:issues) |
17 assert assigns(:issues).include?(Issue.find(13)) | 17 assert assigns(:issues).include?(Issue.find(13)) |
18 end | 18 end |
19 | 19 |
20 def test_auto_complete_with_scope_all_and_cross_project_relations | |
21 Setting.cross_project_issue_relations = '1' | |
22 get :issues, :project_id => 'ecookbook', :q => '13', :scope => 'all' | |
23 assert_response :success | |
24 assert_not_nil assigns(:issues) | |
25 assert assigns(:issues).include?(Issue.find(13)) | |
26 end | |
27 | |
28 def test_auto_complete_with_scope_all_without_cross_project_relations | |
29 Setting.cross_project_issue_relations = '0' | |
30 get :issues, :project_id => 'ecookbook', :q => '13', :scope => 'all' | |
31 assert_response :success | |
32 assert_equal [], assigns(:issues) | |
33 end | |
20 end | 34 end |