提交 8b9bff95 编写于 作者: J José Valim

Small tweaks in ActionController subscriber messages format.

上级 8c8942ed
......@@ -6,7 +6,7 @@ def process_action(event)
request = controller.request
info "\nProcessed #{controller.class.name}##{event.payload[:action]} " \
"to #{request.formats} (for #{request.remote_ip} at #{event.time.to_s(:db)}) " \
"to #{request.formats.join(', ')} (for #{request.remote_ip} at #{event.time.to_s(:db)}) " \
"[#{request.method.to_s.upcase}]"
params = controller.send(:filter_parameters, request.params)
......@@ -37,7 +37,7 @@ def send_file(event)
end
def redirect_to(event)
info "Redirected to #{event.payload[:location]} with status #{event.payload[:status]}"
info "Redirected to #{event.payload[:location]}"
end
def send_data(event)
......
......@@ -70,6 +70,13 @@ def test_process_action
assert_match /Processed\sAnother::SubscribersController#show/, logs[0]
end
def test_process_action_formats
get :show
wait
assert_equal 2, logs.size
assert_match /text\/html/, logs[0]
end
def test_process_action_without_parameters
get :show
wait
......@@ -116,7 +123,7 @@ def test_redirect_to
wait
assert_equal 3, logs.size
assert_equal "Redirected to http://foo.bar/ with status 302", logs[0]
assert_equal "Redirected to http://foo.bar/", logs[0]
end
def test_send_data
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册