aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql/connection_test.rb
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-05-03 12:02:57 -0700
committerGitHub <noreply@github.com>2017-05-03 12:02:57 -0700
commit184c3d3ac206d246d692556c2c71aad411ee6f1e (patch)
tree5681981b3e73747da2a1d0a64f7f1d2f01599d06 /activerecord/test/cases/adapters/postgresql/connection_test.rb
parent5bf3899f601dd08a4e453238bb8e980f659f45df (diff)
parentb6ad4052d18e4b29b8a092526c2beef013e2bf4f (diff)
downloadrails-184c3d3ac206d246d692556c2c71aad411ee6f1e.tar.gz
rails-184c3d3ac206d246d692556c2c71aad411ee6f1e.tar.bz2
rails-184c3d3ac206d246d692556c2c71aad411ee6f1e.zip
Merge pull request #28974 from kamipo/extract_bind_param_and_bind_attribute
Extract `bind_param` and `bind_attribute` into `ActiveRecord::TestCase`
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/connection_test.rb')
-rw-r--r--activerecord/test/cases/adapters/postgresql/connection_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/connection_test.rb b/activerecord/test/cases/adapters/postgresql/connection_test.rb
index c52d9e37cc..3deb007513 100644
--- a/activerecord/test/cases/adapters/postgresql/connection_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/connection_test.rb
@@ -127,8 +127,8 @@ module ActiveRecord
if ActiveRecord::Base.connection.prepared_statements
def test_statement_key_is_logged
- bind = Relation::QueryAttribute.new(nil, 1, Type::Value.new)
- @connection.exec_query("SELECT $1::integer", "SQL", [bind], prepare: true)
+ binds = [bind_attribute(nil, 1)]
+ @connection.exec_query("SELECT $1::integer", "SQL", binds, prepare: true)
name = @subscriber.payloads.last[:statement_name]
assert name
res = @connection.exec_query("EXPLAIN (FORMAT JSON) EXECUTE #{name}(1)")