diff options
author | Azzurrio <just.azzurri@gmail.com> | 2016-02-12 22:31:48 +0200 |
---|---|---|
committer | Azzurrio <just.azzurri@gmail.com> | 2016-02-22 01:19:34 +0200 |
commit | babf5d1d2d08ab1e2be7d404f433f2789b416fe9 (patch) | |
tree | 7b2c8eb14b00a6ac9b9d699d3f79e9ce8aecbaac /activerecord/test/cases | |
parent | db9ef08a8da60fe28b64bfa0136e7549d526f24d (diff) | |
download | rails-babf5d1d2d08ab1e2be7d404f433f2789b416fe9.tar.gz rails-babf5d1d2d08ab1e2be7d404f433f2789b416fe9.tar.bz2 rails-babf5d1d2d08ab1e2be7d404f433f2789b416fe9.zip |
Fix NoMethodError preparable for Arel::Visitors in case prepared statements is falsy
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/prepared_statements_test.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/prepared_statements_test.rb b/activerecord/test/cases/adapters/postgresql/prepared_statements_test.rb new file mode 100644 index 0000000000..f1519db48b --- /dev/null +++ b/activerecord/test/cases/adapters/postgresql/prepared_statements_test.rb @@ -0,0 +1,22 @@ +require "cases/helper" +require "models/developer" + +class PreparedStatementsTest < ActiveRecord::PostgreSQLTestCase + fixtures :developers + + def setup + @default_prepared_statements = Developer.connection_config[:prepared_statements] + Developer.connection_config[:prepared_statements] = false + end + + def teardown + Developer.connection_config[:prepared_statements] = @default_prepared_statements + end + + def nothing_raised_with_falsy_prepared_statements + assert_nothing_raised do + Developer.where(id: 1) + end + end + +end |