aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/calculations_test.rb
diff options
context:
space:
mode:
authorYasuo Honda <yasuo.honda@gmail.com>2019-06-02 06:22:07 +0000
committerYasuo Honda <yasuo.honda@gmail.com>2019-06-02 07:09:59 +0000
commit86384ea88968f38e79728fbe584a7de518acfed0 (patch)
treeed3b9928e1572b152f316322d96debb799cf84fa /activerecord/test/cases/calculations_test.rb
parent22274d320e36a4750fd83b096fb3a490c96559d6 (diff)
downloadrails-86384ea88968f38e79728fbe584a7de518acfed0.tar.gz
rails-86384ea88968f38e79728fbe584a7de518acfed0.tar.bz2
rails-86384ea88968f38e79728fbe584a7de518acfed0.zip
Address test_pluck_columns_with_same_name failure due to nondeterministic sort order
```ruby $ bundle exec rake test_postgresql ... snip ... Failure: CalculationsTest#test_pluck_columns_with_same_name [/home/yahonda/git/rails/activerecord/test/cases/calculations_test.rb:842]: --- expected +++ actual @@ -1 +1 @@ -[["The First Topic", "The Second Topic of the day"], ["The Third Topic of the day", "The Fourth Topic of the day"]] +[["The Third Topic of the day", "The Fourth Topic of the day"], ["The First Topic", "The Second Topic of the day"]] ```
Diffstat (limited to 'activerecord/test/cases/calculations_test.rb')
-rw-r--r--activerecord/test/cases/calculations_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb
index 0d13174e12..e42af3686e 100644
--- a/activerecord/test/cases/calculations_test.rb
+++ b/activerecord/test/cases/calculations_test.rb
@@ -837,7 +837,7 @@ class CalculationsTest < ActiveRecord::TestCase
def test_pluck_columns_with_same_name
expected = [["The First Topic", "The Second Topic of the day"], ["The Third Topic of the day", "The Fourth Topic of the day"]]
- actual = Topic.joins(:replies)
+ actual = Topic.joins(:replies).order(:id)
.pluck("topics.title", "replies_topics.title")
assert_equal expected, actual
end