Fix test asserting the sanitized SQL hash differently to some adapters

上级 90734002
......@@ -6,7 +6,13 @@ def setup
end
def test_sanitize_sql_hash_handles_associations
assert_equal "`adorable_animals`.`name` = 'Bambi'", Binary.send(:sanitize_sql_hash, {adorable_animals: {name: 'Bambi'}})
if current_adapter?(:MysqlAdapter, :Mysql2Adapter)
expected_value = "`adorable_animals`.`name` = 'Bambi'"
else
expected_value = "\"adorable_animals\".\"name\" = 'Bambi'"
end
assert_equal expected_value, Binary.send(:sanitize_sql_hash, {adorable_animals: {name: 'Bambi'}})
end
def test_sanitize_sql_array_handles_string_interpolation
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册