Skip to content
This repository
Browse code

Merge pull request #2877 from dmathieu/fix_tests_pg_18

Last orders the records by id
  • Loading branch information...
commit 164382003c02294950ff227649cf97fb1eb452e8 2 parents 6d93f70 + 51da1e5
Santiago Pastorino spastorino authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 activerecord/test/cases/named_scope_test.rb
4 activerecord/test/cases/named_scope_test.rb
@@ -181,8 +181,8 @@ def test_first_and_last_should_support_find_options
181 181 end
182 182
183 183 def test_first_and_last_should_allow_integers_for_limit
184   - assert_equal Topic.base.first(2), Topic.base.to_a.first(2)
185   - assert_equal Topic.base.last(2), Topic.base.to_a.last(2)
  184 + assert_equal Topic.base.first(2), Topic.base.order("id").to_a.first(2)
  185 + assert_equal Topic.base.last(2), Topic.base.order("id").to_a.last(2)
186 186 end
187 187
188 188 def test_first_and_last_should_not_use_query_when_results_are_loaded

0 comments on commit 1643820

Please sign in to comment.
Something went wrong with that request. Please try again.