@@ -11,6 +11,7 class AutoCompletesController < ApplicationController | |||||
11 | unless q.blank? |
|
11 | unless q.blank? | |
12 | @issues += query.visible.find(:all, :conditions => ["LOWER(#{Issue.table_name}.subject) LIKE ?", "%#{q.downcase}%"], :limit => 10) |
|
12 | @issues += query.visible.find(:all, :conditions => ["LOWER(#{Issue.table_name}.subject) LIKE ?", "%#{q.downcase}%"], :limit => 10) | |
13 | end |
|
13 | end | |
|
14 | @issues.compact! | |||
14 | render :layout => false |
|
15 | render :layout => false | |
15 | end |
|
16 | end | |
16 |
|
17 |
@@ -29,6 +29,6 class AutoCompletesControllerTest < ActionController::TestCase | |||||
29 | Setting.cross_project_issue_relations = '0' |
|
29 | Setting.cross_project_issue_relations = '0' | |
30 | get :issues, :project_id => 'ecookbook', :q => '13', :scope => 'all' |
|
30 | get :issues, :project_id => 'ecookbook', :q => '13', :scope => 'all' | |
31 | assert_response :success |
|
31 | assert_response :success | |
32 |
assert_equal [ |
|
32 | assert_equal [], assigns(:issues) | |
33 | end |
|
33 | end | |
34 | end |
|
34 | end |
General Comments 0
You need to be logged in to leave comments.
Login now