Sha256: 370314a05f14dcd803cff9e34861380367a3e12bc6f172c51effb835c24200d3

Contents?: true

Size: 706 Bytes

Versions: 4

Compression:

Stored size: 706 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper.rb'

class TestConfig < Test::Unit::TestCase
  def test_per_page
    Searchgasm::Config.search.per_page = 1
    
    assert Account.count > 1
    assert Account.all.size > 1
    assert User.all.size > 1
    assert User.find(:all, :per_page => 1).size == 1
    assert User.new_search.all.size == 1
    assert User.new_search(:per_page => nil).all.size > 1
    
    Searchgasm::Config.search.per_page = nil
    
    assert Account.count > 1
    assert Account.all.size > 1
    assert User.all.size > 1
    assert User.find(:all, :per_page => 1).size == 1
    assert User.new_search.all.size > 1
    assert User.new_search(:per_page => 1).all.size == 1
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
searchgasm-1.5.3 test/test_config.rb
searchgasm-1.5.2 test/test_config.rb
searchgasm-1.5.0 test/test_config.rb
searchgasm-1.5.1 test/test_config.rb