Autocomplete issue relations on subject (#3170).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4502 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2010-12-12 16:04:28 +00:00
parent 758f2f0a4e
commit a8b12bcb52
5 changed files with 35 additions and 3 deletions
@@ -17,4 +17,18 @@ class AutoCompletesControllerTest < ActionController::TestCase
assert assigns(:issues).include?(Issue.find(13))
end
def test_auto_complete_with_scope_all_and_cross_project_relations
Setting.cross_project_issue_relations = '1'
get :issues, :project_id => 'ecookbook', :q => '13', :scope => 'all'
assert_response :success
assert_not_nil assigns(:issues)
assert assigns(:issues).include?(Issue.find(13))
end
def test_auto_complete_with_scope_all_without_cross_project_relations
Setting.cross_project_issue_relations = '0'
get :issues, :project_id => 'ecookbook', :q => '13', :scope => 'all'
assert_response :success
assert_equal [nil], assigns(:issues)
end
end