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, 3 insertions, 4 deletions
diff --git a/activerecord/test/cases/bind_parameter_test.rb b/activerecord/test/cases/bind_parameter_test.rb
index 49fe219563..5af44c27eb 100644
--- a/activerecord/test/cases/bind_parameter_test.rb
+++ b/activerecord/test/cases/bind_parameter_test.rb
@@ -39,9 +39,8 @@ if ActiveRecord::Base.connection.prepared_statements
end
def test_binds_are_logged
- sub = Arel::Nodes::BindParam.new
- binds = [Relation::QueryAttribute.new("id", 1, Type::Value.new)]
- sql = "select * from topics where id = #{sub.to_sql}"
+ binds = [bind_attribute("id", 1)]
+ sql = "select * from topics where id = #{bind_param.to_sql}"
@connection.exec_query(sql, "SQL", binds)
@@ -56,7 +55,7 @@ if ActiveRecord::Base.connection.prepared_statements
end
def test_logs_binds_after_type_cast
- binds = [Relation::QueryAttribute.new("id", "10", Type::Integer.new)]
+ binds = [bind_attribute("id", "10", Type::Integer.new)]
assert_logs_binds(binds)
end