1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #2877 from dmathieu/fix_tests_pg_18

Last orders the records by id
This commit is contained in:
Santiago Pastorino 2011-09-05 15:41:59 -07:00
commit 164382003c

View file

@ -181,8 +181,8 @@ class NamedScopeTest < ActiveRecord::TestCase
end
def test_first_and_last_should_allow_integers_for_limit
assert_equal Topic.base.first(2), Topic.base.to_a.first(2)
assert_equal Topic.base.last(2), Topic.base.to_a.last(2)
assert_equal Topic.base.first(2), Topic.base.order("id").to_a.first(2)
assert_equal Topic.base.last(2), Topic.base.order("id").to_a.last(2)
end
def test_first_and_last_should_not_use_query_when_results_are_loaded