Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (19 sloc) 0.711 kB
require File.dirname(__FILE__) + '/test_helper.rb'
class ConfigTest < ActiveSupport::TestCase
def test_per_page
Searchlogic::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
Searchlogic::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
Jump to Line
Something went wrong with that request. Please try again.