diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2011-05-22 18:10:52 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2011-05-22 18:10:52 -0500 |
commit | ba3ea9c90b000d8520944b51b2f6d41af148090c (patch) | |
tree | f92af256a852ea4cd37f4a047549ab5423984d42 /actionpack | |
parent | 7124659f3ec0f7d732628a5c1dc1aa8e719aa0ae (diff) | |
download | rails-ba3ea9c90b000d8520944b51b2f6d41af148090c.tar.gz rails-ba3ea9c90b000d8520944b51b2f6d41af148090c.tar.bz2 rails-ba3ea9c90b000d8520944b51b2f6d41af148090c.zip |
Revert "Take into account time spent in AR even if a redirect occurs or if it is after the render" because it's causing test failures about missing db_during_render.
This reverts commit 60b55baca9e381deb3a0a85580f089f4caf551d4.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/activerecord/controller_runtime_test.rb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/actionpack/test/activerecord/controller_runtime_test.rb b/actionpack/test/activerecord/controller_runtime_test.rb index 2d789395ce..b87b9f9c47 100644 --- a/actionpack/test/activerecord/controller_runtime_test.rb +++ b/actionpack/test/activerecord/controller_runtime_test.rb @@ -15,17 +15,6 @@ class ControllerRuntimeLogSubscriberTest < ActionController::TestCase def zero render :inline => "Zero DB runtime" end - - def redirect - Project.all - redirect_to :action => 'show' - end - - def db_after_render - render :inline => "Hello world" - Project.all - ActiveRecord::LogSubscriber.runtime += 100 - end end include ActiveSupport::LogSubscriber::TestHelper @@ -63,19 +52,4 @@ class ControllerRuntimeLogSubscriberTest < ActionController::TestCase assert_equal 2, @logger.logged(:info).size assert_match(/\(Views: [\d.]+ms \| ActiveRecord: 0.0ms\)/, @logger.logged(:info)[1]) end - - def test_log_with_active_record_when_redirecting - get :redirect - wait - assert_equal 3, @logger.logged(:info).size - assert_match(/\(ActiveRecord: [\d.]+ms\)/, @logger.logged(:info)[2]) - end - - def test_include_time_query_time_after_rendering - get :db_after_render - wait - - assert_equal 2, @logger.logged(:info).size - assert_match(/\(Views: [\d.]+ms \| ActiveRecord: ([1-9][\d.]+)ms\)/, @logger.logged(:info)[1]) - end end |