diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-29 13:12:56 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-29 14:02:58 -0800 |
commit | 9bf8bf82b9d8614d9c7ccc31892887f6a79ce2f5 (patch) | |
tree | 648e20705e7ca4730c80adedcd0af7d8643313e1 /activerecord/test/cases | |
parent | 7837574e5bc229d4a07e40151eb303e7d6c120ec (diff) | |
download | rails-9bf8bf82b9d8614d9c7ccc31892887f6a79ce2f5.tar.gz rails-9bf8bf82b9d8614d9c7ccc31892887f6a79ce2f5.tar.bz2 rails-9bf8bf82b9d8614d9c7ccc31892887f6a79ce2f5.zip |
Adapters keep in_use flag when leased
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/connection_adapters/abstract_adapter_test.rb | 16 |
1 files changed, 16 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 new file mode 100644 index 0000000000..ef6a57d328 --- /dev/null +++ b/activerecord/test/cases/connection_adapters/abstract_adapter_test.rb @@ -0,0 +1,16 @@ +require "cases/helper" + +module ActiveRecord + module ConnectionAdapters + class AbstractAdapterTest < ActiveRecord::TestCase + def test_in_use? + adapter = AbstractAdapter.new nil, nil + + # FIXME: change to refute in Rails 4.0 / mt + assert !adapter.in_use?, 'adapter is not in use' + assert adapter.lease, 'lease adapter' + assert adapter.in_use?, 'adapter is in use' + end + end + end +end |