aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/rack/logger_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/application/rack/logger_test.rb')
-rw-r--r--railties/test/application/rack/logger_test.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/railties/test/application/rack/logger_test.rb b/railties/test/application/rack/logger_test.rb
index a77c6f472c..2f5bd3a764 100644
--- a/railties/test/application/rack/logger_test.rb
+++ b/railties/test/application/rack/logger_test.rb
@@ -5,6 +5,7 @@ require "rack/test"
module ApplicationTests
module RackTests
class LoggerTest < ActiveSupport::TestCase
+ include ActiveSupport::Testing::Isolation
include ActiveSupport::LogSubscriber::TestHelper
include Rack::Test::Methods
@@ -17,6 +18,7 @@ module ApplicationTests
end
def teardown
+ super
teardown_app
end
@@ -24,12 +26,18 @@ module ApplicationTests
@logs ||= @logger.logged(:info)
end
- test "logger logs proper HTTP verb and path" do
+ test "logger logs proper HTTP GET verb and path" do
get "/blah"
wait
assert_match(/^Started GET "\/blah"/, logs[0])
end
+ test "logger logs proper HTTP HEAD verb and path" do
+ head "/blah"
+ wait
+ assert_match(/^Started HEAD "\/blah"/, logs[0])
+ end
+
test "logger logs HTTP verb override" do
post "/", {:_method => 'put'}
wait