diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-28 16:43:34 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-28 16:43:34 -0700 |
commit | 4211866b7a1d0abf0c9150fd61ea67a8043b831d (patch) | |
tree | 8de03d27c551c085f35b6297f51e97917fadf83b /activerecord/test | |
parent | ec0cacc2938cb7159ae6085fc653b2be906a748f (diff) | |
download | rails-4211866b7a1d0abf0c9150fd61ea67a8043b831d.tar.gz rails-4211866b7a1d0abf0c9150fd61ea67a8043b831d.tar.bz2 rails-4211866b7a1d0abf0c9150fd61ea67a8043b831d.zip |
adding active_connection? to the connection pool
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/connection_pool_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/connection_pool_test.rb b/activerecord/test/cases/connection_pool_test.rb index 7ac14fa8d6..f92f4e62c5 100644 --- a/activerecord/test/cases/connection_pool_test.rb +++ b/activerecord/test/cases/connection_pool_test.rb @@ -18,6 +18,14 @@ module ActiveRecord end end + def test_active_connection? + assert !@pool.active_connection? + assert @pool.connection + assert @pool.active_connection? + @pool.release_connection + assert !@pool.active_connection? + end + def test_pool_caches_columns columns = @pool.columns['posts'] assert_equal columns, @pool.columns['posts'] |