Commit 5c8e04db authored by Felix Schäfer's avatar Felix Schäfer

Fix SearchController tests.

The "dd" the removed assert_tag part was supposed to find should never show up on the page in the first place (it's in a journal, not in the issue itself).
parent 35a38086
......@@ -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
......
......@@ -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']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment