diff --git a/app/models/news.rb b/app/models/news.rb index 21529050..6f97e0d1 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -25,7 +25,7 @@ class News < ActiveRecord::Base validates_length_of :summary, :maximum => 255 acts_as_journalized :event_url => Proc.new {|o| {:controller => 'news', :action => 'show', :id => o.journaled_id} } - acts_as_searchable :columns => ['title', 'summary', "#{table_name}.description"], :include => :project + acts_as_searchable :columns => ["#{table_name}.title", "#{table_name}.summary", "#{table_name}.description"], :include => :project acts_as_watchable after_create :add_author_as_watcher diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb index bcc0b3e8..52223efe 100644 --- a/test/functional/search_controller_test.rb +++ b/test/functional/search_controller_test.rb @@ -36,9 +36,9 @@ class SearchControllerTest < ActionController::TestCase assert assigns(:results).include?(Issue.find(2)) assert assigns(:results).include?(Issue.find(5)) assert assigns(:results).include?(Changeset.find(101)) - assert_tag :dt, :attributes => { :class => /issue/ }, - :child => { :tag => 'a', :content => /Add ingredients categories/ }, - :sibling => { :tag => 'dd', :content => /A comment with inline image: !picture.jpg!/ } + assert_select "dt.issue" do + assert_select "a", :text => /Add ingredients categories/ + end assert assigns(:results_by_type).is_a?(Hash) assert_equal 5, assigns(:results_by_type)['changesets']