diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-29 13:19:58 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-29 14:02:58 -0800 |
commit | f866f66b3073aaef4140f0c9ccbb8b3df707416e (patch) | |
tree | b70ecffaa24f6c1afd75df5f005a077db0823c75 /activerecord/test/cases | |
parent | 79306de791ad69559c0806b376233d9d8803ac59 (diff) | |
download | rails-f866f66b3073aaef4140f0c9ccbb8b3df707416e.tar.gz rails-f866f66b3073aaef4140f0c9ccbb8b3df707416e.tar.bz2 rails-f866f66b3073aaef4140f0c9ccbb8b3df707416e.zip |
expire will set in_use to false
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/connection_adapters/abstract_adapter_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/connection_adapters/abstract_adapter_test.rb b/activerecord/test/cases/connection_adapters/abstract_adapter_test.rb index 3e6f829194..962a5b46fd 100644 --- a/activerecord/test/cases/connection_adapters/abstract_adapter_test.rb +++ b/activerecord/test/cases/connection_adapters/abstract_adapter_test.rb @@ -26,6 +26,13 @@ module ActiveRecord adapter.lease assert adapter.last_use end + + def test_expire_mutates_in_use + assert adapter.lease, 'lease adapter' + assert adapter.in_use?, 'adapter is in use' + adapter.expire + assert !adapter.in_use?, 'adapter is in use' + end end end end |