aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/belongs_to_associations_test.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-07-13 04:31:42 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-07-13 04:31:42 +0900
commit006aea643f020250d02673ce49b572c8cfc2dc37 (patch)
tree5955adb6918f8cdb8d5523410fa5f8f0af837145 /activerecord/test/cases/associations/belongs_to_associations_test.rb
parentbfbae885b290d35d7cbdcdf7f6b6c157bacac392 (diff)
downloadrails-006aea643f020250d02673ce49b572c8cfc2dc37.tar.gz
rails-006aea643f020250d02673ce49b572c8cfc2dc37.tar.bz2
rails-006aea643f020250d02673ce49b572c8cfc2dc37.zip
Remove extra `.merge!(order: "id")` for `Relation#first` in tests
Since 07e5301, `Relation#first` will order by primary key if no order is defined.
Diffstat (limited to 'activerecord/test/cases/associations/belongs_to_associations_test.rb')
-rw-r--r--activerecord/test/cases/associations/belongs_to_associations_test.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb
index a727cc6e60..a7ac291f23 100644
--- a/activerecord/test/cases/associations/belongs_to_associations_test.rb
+++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb
@@ -647,8 +647,7 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase
def test_new_record_with_foreign_key_but_no_object
client = Client.new("firm_id" => 1)
- # sometimes tests on Oracle fail if ORDER BY is not provided therefore add always :order with :first
- assert_equal Firm.all.merge!(order: "id").first, client.firm_with_basic_id
+ assert_equal Firm.first, client.firm_with_basic_id
end
def test_setting_foreign_key_after_nil_target_loaded