diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-08-01 17:34:14 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-08-01 17:34:14 -0400 |
commit | feb1ddae021c38174f9c22bbd1298c8b73431b45 (patch) | |
tree | 09a38695596cf80dc362dd4d93cf94d6f7415e7b /activerecord/test/cases/bind_parameter_test.rb | |
parent | 3540e60c385286f3517ff56270b31a91ed3024a3 (diff) | |
parent | f9a43f28c087f8ffd35ff7c33a60c938b60f2be2 (diff) | |
download | rails-feb1ddae021c38174f9c22bbd1298c8b73431b45.tar.gz rails-feb1ddae021c38174f9c22bbd1298c8b73431b45.tar.bz2 rails-feb1ddae021c38174f9c22bbd1298c8b73431b45.zip |
Merge remote-tracking branch 'origin/master' into unlock-minitest
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 |