diff options
author | Matthew Draper <matthew@trebex.net> | 2017-02-25 12:26:14 +1030 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2017-02-25 12:29:28 +1030 |
commit | f6f7deed4ae5c066afab30171076132e3df4fc6a (patch) | |
tree | 4dd3694ed888b88cf6d039d381033101073c91d1 /activerecord/test/cases | |
parent | 0325758046ff51e1cbeae6ad7bd6d889b479cdad (diff) | |
download | rails-f6f7deed4ae5c066afab30171076132e3df4fc6a.tar.gz rails-f6f7deed4ae5c066afab30171076132e3df4fc6a.tar.bz2 rails-f6f7deed4ae5c066afab30171076132e3df4fc6a.zip |
Order array contents to match Relation#first
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/scoping/named_scoping_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/scoping/named_scoping_test.rb b/activerecord/test/cases/scoping/named_scoping_test.rb index 995ff4dfc5..d261fd5321 100644 --- a/activerecord/test/cases/scoping/named_scoping_test.rb +++ b/activerecord/test/cases/scoping/named_scoping_test.rb @@ -161,7 +161,7 @@ class NamedScopingTest < 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.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 |