diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-21 11:19:45 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-26 13:44:10 -0700 |
commit | 1741bbe2d5cb58af76fb2ca31a25c05eadfadb71 (patch) | |
tree | f6bc9d5a4ce3694593cfda9778d7cf27973743af /activerecord/test/cases/adapters/postgresql/schema_authorization_test.rb | |
parent | 28a18b59885913682ffb1bceb87694eccd217df2 (diff) | |
download | rails-1741bbe2d5cb58af76fb2ca31a25c05eadfadb71.tar.gz rails-1741bbe2d5cb58af76fb2ca31a25c05eadfadb71.tar.bz2 rails-1741bbe2d5cb58af76fb2ca31a25c05eadfadb71.zip |
avoiding statement cache if there are no bind values
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/schema_authorization_test.rb')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/schema_authorization_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/schema_authorization_test.rb b/activerecord/test/cases/adapters/postgresql/schema_authorization_test.rb index 6f372edc38..8fdda20f77 100644 --- a/activerecord/test/cases/adapters/postgresql/schema_authorization_test.rb +++ b/activerecord/test/cases/adapters/postgresql/schema_authorization_test.rb @@ -43,6 +43,18 @@ class SchemaAuthorizationTest < ActiveRecord::TestCase end end + def test_auth_with_bind + assert_nothing_raised do + set_session_auth + USERS.each do |u| + @connection.clear_cache! + set_session_auth u + assert_equal u, @connection.exec("SELECT name FROM #{TABLE_NAME} WHERE id = $1", 'SQL', [[nil, 1]]).first['name'] + set_session_auth + end + end + end + def test_schema_uniqueness assert_nothing_raised do set_session_auth |