Methods
- L
- S
- T
-
- teardown,
- test_append_info_to_payload_is_called_even_with_exception,
- test_filter_redirect_url_by_regexp,
- test_filter_redirect_url_by_string,
- test_halted_callback,
- test_multiple_process_with_parameters,
- test_process_action,
- test_process_action_with_exception_includes_http_status_code,
- test_process_action_with_filter_parameters,
- test_process_action_with_parameters,
- test_process_action_with_rescued_exception_includes_http_status_code,
- test_process_action_with_view_runtime,
- test_process_action_with_with_action_not_found_logs_404,
- test_process_action_with_wrapped_parameters,
- test_process_action_without_parameters,
- test_redirect_to,
- test_send_data,
- test_send_file,
- test_start_processing,
- test_with_fragment_cache,
- test_with_fragment_cache_and_percent_in_key,
- test_with_fragment_cache_if_with_false,
- test_with_fragment_cache_if_with_true,
- test_with_fragment_cache_unless_with_false,
- test_with_fragment_cache_unless_with_true
Included Modules
Instance Public methods
logs()
Link
set_logger(logger)
Link
setup()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 93 def setup super @old_logger = ActionController::Base.logger @cache_path = File.join Dir.tmpdir, Dir::Tmpname.make_tmpname('tmp', 'cache') @controller.cache_store = :file_store, @cache_path ActionController::LogSubscriber.attach_to :action_controller end
teardown()
Link
test_append_info_to_payload_is_called_even_with_exception()
Link
test_filter_redirect_url_by_regexp()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 215 def test_filter_redirect_url_by_regexp @request.env['action_dispatch.redirect_filter'] = [/secret\.foo.+/] get :filterable_redirector wait assert_equal 3, logs.size assert_equal "Redirected to [FILTERED]", logs[1] end
test_filter_redirect_url_by_string()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 206 def test_filter_redirect_url_by_string @request.env['action_dispatch.redirect_filter'] = ['secret'] get :filterable_redirector wait assert_equal 3, logs.size assert_equal "Redirected to [FILTERED]", logs[1] end
test_halted_callback()
Link
test_multiple_process_with_parameters()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 150 def test_multiple_process_with_parameters get :show, :id => '10' get :show, :id => '20' wait assert_equal 6, logs.size assert_equal 'Parameters: {"id"=>"10"}', logs[1] assert_equal 'Parameters: {"id"=>"20"}', logs[4] end
test_process_action()
Link
test_process_action_with_exception_includes_http_status_code()
Link
test_process_action_with_filter_parameters()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 186 def test_process_action_with_filter_parameters @request.env["action_dispatch.parameter_filter"] = [:lifo, :amount] get :show, :lifo => 'Pratik', :amount => '420', :step => '1' wait params = logs[1] assert_match(/"amount"=>"\[FILTERED\]"/, params) assert_match(/"lifo"=>"\[FILTERED\]"/, params) assert_match(/"step"=>"1"/, params) end
test_process_action_with_parameters()
Link
test_process_action_with_rescued_exception_includes_http_status_code()
Link
test_process_action_with_view_runtime()
Link
test_process_action_with_with_action_not_found_logs_404()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 331 def test_process_action_with_with_action_not_found_logs_404 begin get :with_action_not_found wait rescue AbstractController::ActionNotFound end assert_equal 2, logs.size assert_match(/Completed 404/, logs.last) end
test_process_action_with_wrapped_parameters()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 161 def test_process_action_with_wrapped_parameters @request.env['CONTENT_TYPE'] = 'application/json' post :show, :id => '10', :name => 'jose' wait assert_equal 3, logs.size assert_match '"person"=>{"name"=>"jose"}', logs[1] end
test_process_action_without_parameters()
Link
test_redirect_to()
Link
test_send_data()
Link
test_send_file()
Link
test_start_processing()
Link
test_with_fragment_cache()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 241 def test_with_fragment_cache @controller.config.perform_caching = true get :with_fragment_cache wait assert_equal 4, logs.size assert_match(/Read fragment views\/foo/, logs[1]) assert_match(/Write fragment views\/foo/, logs[2]) ensure @controller.config.perform_caching = true end
test_with_fragment_cache_and_percent_in_key()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 301 def test_with_fragment_cache_and_percent_in_key @controller.config.perform_caching = true get :with_fragment_cache_and_percent_in_key wait assert_equal 4, logs.size assert_match(/Read fragment views\/foo/, logs[1]) assert_match(/Write fragment views\/foo/, logs[2]) ensure @controller.config.perform_caching = true end
test_with_fragment_cache_if_with_false()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 265 def test_with_fragment_cache_if_with_false @controller.config.perform_caching = true get :with_fragment_cache_if_with_false_condition wait assert_equal 2, logs.size assert_no_match(/Read fragment views\/foo/, logs[1]) assert_no_match(/Write fragment views\/foo/, logs[2]) ensure @controller.config.perform_caching = true end
test_with_fragment_cache_if_with_true()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 253 def test_with_fragment_cache_if_with_true @controller.config.perform_caching = true get :with_fragment_cache_if_with_true_condition wait assert_equal 4, logs.size assert_match(/Read fragment views\/foo/, logs[1]) assert_match(/Write fragment views\/foo/, logs[2]) ensure @controller.config.perform_caching = true end
test_with_fragment_cache_unless_with_false()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 289 def test_with_fragment_cache_unless_with_false @controller.config.perform_caching = true get :with_fragment_cache_unless_with_false_condition wait assert_equal 4, logs.size assert_match(/Read fragment views\/foo/, logs[1]) assert_match(/Write fragment views\/foo/, logs[2]) ensure @controller.config.perform_caching = true end
test_with_fragment_cache_unless_with_true()
Link
# File actionpack/test/controller/log_subscriber_test.rb, line 277 def test_with_fragment_cache_unless_with_true @controller.config.perform_caching = true get :with_fragment_cache_unless_with_true_condition wait assert_equal 2, logs.size assert_no_match(/Read fragment views\/foo/, logs[1]) assert_no_match(/Write fragment views\/foo/, logs[2]) ensure @controller.config.perform_caching = true end