diff options
Diffstat (limited to 'activerecord/test/cases/bind_parameter_test.rb')
-rw-r--r-- | activerecord/test/cases/bind_parameter_test.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/activerecord/test/cases/bind_parameter_test.rb b/activerecord/test/cases/bind_parameter_test.rb index 5af44c27eb..91cc49385c 100644 --- a/activerecord/test/cases/bind_parameter_test.rb +++ b/activerecord/test/cases/bind_parameter_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cases/helper" require "models/topic" require "models/author" @@ -39,8 +41,9 @@ if ActiveRecord::Base.connection.prepared_statements end def test_binds_are_logged - binds = [bind_attribute("id", 1)] - sql = "select * from topics where id = #{bind_param.to_sql}" + sub = Arel::Nodes::BindParam.new(1) + binds = [Relation::QueryAttribute.new("id", 1, Type::Value.new)] + sql = "select * from topics where id = #{sub.to_sql}" @connection.exec_query(sql, "SQL", binds) @@ -55,7 +58,7 @@ if ActiveRecord::Base.connection.prepared_statements end def test_logs_binds_after_type_cast - binds = [bind_attribute("id", "10", Type::Integer.new)] + binds = [Relation::QueryAttribute.new("id", "10", Type::Integer.new)] assert_logs_binds(binds) end |