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

Changeset 154

Show
Ignore:
Timestamp:
02/09/07 21:13:35 (2 years ago)
Author:
jk
Message:

#60

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/demo/test/unit/content_test.rb

    r152 r154  
    263263  #end 
    264264   
     265  def test_multi_search_find_options 
     266    contents_from_ferret = Content.multi_search('title', [], {}, :order => 'id desc') 
     267    assert_equal 2, contents_from_ferret.size 
     268    assert contents_from_ferret.first.id > contents_from_ferret.last.id 
     269    contents_from_ferret = Content.multi_search('title', [], {}, :order => 'id asc') 
     270    assert contents_from_ferret.first.id < contents_from_ferret.last.id 
     271 
     272    contents_from_ferret = Content.multi_search('title', [], {}, :limit => 1) 
     273    assert_equal 1, contents_from_ferret.size 
     274  end 
     275 
    265276  def test_multi_search 
    266277    assert_equal 4, ContentBase.find(:all).size 

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