To edit pages or tickets please login with username/password: aaf/aaf

root/trunk/demo/test/unit/special_content_test.rb

Revision 319, 0.7 kB (checked in by jk, 8 months ago)

only some failures left

Line 
1 require File.dirname(__FILE__) + '/../test_helper'
2
3 class SpecialContentTest < Test::Unit::TestCase
4   include Ferret::Index
5   include Ferret::Search
6   fixtures :contents, :comments
7
8   def setup
9     ContentBase.rebuild_index
10     Comment.rebuild_index
11   end
12  
13   def test_class_index_dir
14     assert SpecialContent.aaf_configuration[:index_dir] =~ %r{^#{RAILS_ROOT}/index/test/content_base}
15   end
16
17   def test_find_with_ferret
18     contents_from_ferret = SpecialContent.find_with_ferret('single table')
19     assert_equal 1, contents_from_ferret.size
20     assert_equal ContentBase.find(3), contents_from_ferret.first
21     contents_from_ferret = SpecialContent.find_with_ferret('title')
22     assert contents_from_ferret.empty?
23    
24   end
25 end
Note: See TracBrowser for help on using the browser.

To edit pages or tickets please login with username/password: aaf/aaf