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

Changeset 227

Show
Ignore:
Timestamp:
08/27/07 19:12:04 (1 year ago)
Author:
jk
Message:

pagination test

Files:

Legend:

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

    r223 r227  
    233233  end 
    234234 
     235  def test_pagination_with_more_conditions 
     236    more_contents 
     237 
     238    r = Content.find_with_ferret 'title -description:0', { :page => 1, :per_page => 10 }, 
     239                                            { :conditions => "description != '9'", :order => 'title ASC' } 
     240    assert_equal 28, r.total_hits 
     241    assert_equal 10, r.size 
     242    assert_equal "1", r.first.description 
     243    assert_equal "11", r.last.description 
     244    assert_equal 1, r.current_page 
     245    assert_equal 3, r.page_count 
     246  end 
     247 
    235248  protected 
    236249  def more_contents 

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