diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-08-14 09:34:31 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-08-14 09:34:31 +0200 |
commit | 77ba336080b4de15233f669bdeea5c9ac44a3941 (patch) | |
tree | f352ba5b9aebedf8909457507cbfd10ef7d51008 /activerecord | |
parent | 2df6d7141b294723190c2356a5227834ba6fdfcb (diff) | |
download | rails-77ba336080b4de15233f669bdeea5c9ac44a3941.tar.gz rails-77ba336080b4de15233f669bdeea5c9ac44a3941.tar.bz2 rails-77ba336080b4de15233f669bdeea5c9ac44a3941.zip |
test-case for fixed issue #11870.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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 |