diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-07-10 18:02:31 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-07-10 18:02:31 -0700 |
commit | c3732bfed01de49947dd0aedd8cc976128b7f5db (patch) | |
tree | 435b177788278fa545bea71a781d7831fd3dda1d /activerecord/test/cases/log_subscriber_test.rb | |
parent | 60076de1d416a68dc52804041f3c8586578acbd9 (diff) | |
parent | 618300f05a71bf728d9495c8f8226a8724c5a023 (diff) | |
download | rails-c3732bfed01de49947dd0aedd8cc976128b7f5db.tar.gz rails-c3732bfed01de49947dd0aedd8cc976128b7f5db.tar.bz2 rails-c3732bfed01de49947dd0aedd8cc976128b7f5db.zip |
Merge pull request #1823 from gnarg/master
Log instrumentation name for exists? queries
Diffstat (limited to 'activerecord/test/cases/log_subscriber_test.rb')
-rw-r--r-- | activerecord/test/cases/log_subscriber_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/log_subscriber_test.rb b/activerecord/test/cases/log_subscriber_test.rb index c6c6079490..9e8475465e 100644 --- a/activerecord/test/cases/log_subscriber_test.rb +++ b/activerecord/test/cases/log_subscriber_test.rb @@ -63,6 +63,14 @@ class LogSubscriberTest < ActiveRecord::TestCase assert_match(/SELECT .*?FROM .?developers.?/i, @logger.logged(:debug).last) end + def test_exists_query_logging + Developer.exists? 1 + wait + assert_equal 1, @logger.logged(:debug).size + assert_match(/Developer Exists/, @logger.logged(:debug).last) + assert_match(/SELECT .*?FROM .?developers.?/i, @logger.logged(:debug).last) + end + def test_cached_queries ActiveRecord::Base.cache do Developer.all |