aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/bind_parameter_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/bind_parameter_test.rb')
-rw-r--r--activerecord/test/cases/bind_parameter_test.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activerecord/test/cases/bind_parameter_test.rb b/activerecord/test/cases/bind_parameter_test.rb
index 5af44c27eb..49fe219563 100644
--- a/activerecord/test/cases/bind_parameter_test.rb
+++ b/activerecord/test/cases/bind_parameter_test.rb
@@ -39,8 +39,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
+ 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 +56,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