diff options
author | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-11-20 11:28:03 +0530 |
---|---|---|
committer | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-11-20 14:20:35 +0530 |
commit | 8b77d8e387079da2d5d4cf2f6fcc4864195852bc (patch) | |
tree | b6a44f43c03216802039e0b2250b4fa3372f6f8f /actionview/test/fixtures/mascot.rb | |
parent | 9008a60dc5c24b0fe884087095900797ace6263a (diff) | |
download | rails-8b77d8e387079da2d5d4cf2f6fcc4864195852bc.tar.gz rails-8b77d8e387079da2d5d4cf2f6fcc4864195852bc.tar.bz2 rails-8b77d8e387079da2d5d4cf2f6fcc4864195852bc.zip |
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.
Diffstat (limited to 'actionview/test/fixtures/mascot.rb')
0 files changed, 0 insertions, 0 deletions