mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
test-case for fixed issue #11870.
This commit is contained in:
parent
2df6d7141b
commit
77ba336080
1 changed files with 4 additions and 0 deletions
|
@ -170,6 +170,10 @@ class RelationTest < ActiveRecord::TestCase
|
||||||
assert_equal topics(:fourth).title, topics.first.title
|
assert_equal topics(:fourth).title, topics.first.title
|
||||||
end
|
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
|
def test_raising_exception_on_invalid_hash_params
|
||||||
assert_raise(ArgumentError) { Topic.order(:name, "id DESC", :id => :DeSc) }
|
assert_raise(ArgumentError) { Topic.order(:name, "id DESC", :id => :DeSc) }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue