1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test
Prathamesh Sonpatki 8b77d8e387
Fix prepared statements disabled test again
- Due to `assert_nothing_raised` this test was not really testing
  anything.
- So updated it to assert that the query gives expected result.
- Also in general we can use `connection.unprepared_statement` for
  testing queries w/o prepared statements but it can't be used in this
  case. This test cases was added because when prepared_statements
  config is set to false, then DetermineIfPreparableVisitor module
  does not extended by Arel visitor resulting into an error. Ref: https://github.com/rails/rails/pull/22748.
- Because DetermineIfPreparableVisitor module does not get added to the
  visitor chain only if prepared_statements is false while **setting up
  connection**, not when `unprepared_statement` is used.
- I have also added an assertion for making sure that prepared_config
  is set to false from the start, so that nobody accidentally removes
  the connection setup using `arunit_without_prepared_statements` and
  replaces it with stubs or unprepared_statement.
2016-11-20 14:20:35 +05:30
..
active_record/connection_adapters
assets
cases Fix prepared statements disabled test again 2016-11-20 14:20:35 +05:30
fixtures
migrations
models
schema
support
.gitignore
config.example.yml
config.rb