From 77ba336080b4de15233f669bdeea5c9ac44a3941 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Wed, 14 Aug 2013 09:34:31 +0200 Subject: test-case for fixed issue #11870. --- activerecord/test/cases/relations_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord') diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index bf9d395b2d..e1a760d240 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -170,6 +170,10 @@ class RelationTest < ActiveRecord::TestCase assert_equal topics(:fourth).title, topics.first.title end + def test_order_with_hash_and_symbol_generates_the_same_sql + assert_equal Topic.order(:id).to_sql, Topic.order(:id => :asc).to_sql + end + def test_raising_exception_on_invalid_hash_params assert_raise(ArgumentError) { Topic.order(:name, "id DESC", :id => :DeSc) } end -- cgit v1.2.3