diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-23 08:36:58 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-23 08:36:58 -0700 |
commit | 5ebc1d88d3c80f8773d39b155a4e6f66544ec46b (patch) | |
tree | 179767810b5cdf810146d5e3fb22657cd0db90d2 /activerecord/test | |
parent | 9b48a94c0ae1d128d819e2523a813738c1662489 (diff) | |
download | rails-5ebc1d88d3c80f8773d39b155a4e6f66544ec46b.tar.gz rails-5ebc1d88d3c80f8773d39b155a4e6f66544ec46b.tar.bz2 rails-5ebc1d88d3c80f8773d39b155a4e6f66544ec46b.zip |
testing sqlbypass destroy. caching connection during destroy
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/session_store/sql_bypass.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/cases/session_store/sql_bypass.rb b/activerecord/test/cases/session_store/sql_bypass.rb index 0059467bc0..f0ba166465 100644 --- a/activerecord/test/cases/session_store/sql_bypass.rb +++ b/activerecord/test/cases/session_store/sql_bypass.rb @@ -42,6 +42,15 @@ module ActiveRecord assert_equal s.session_id, t.session_id assert_equal s.data, t.data end + + def test_destroy + SqlBypass.create_table! unless Session.table_exists? + session_id = 20 + s = SqlBypass.new :data => 'hello', :session_id => session_id + s.save + s.destroy + assert_nil SqlBypass.find_by_session_id session_id + end end end end |