Methods
- S
- T
-
- test_head_created,
- test_head_created_with_application_json_content_type,
- test_head_ok_with_image_png_content_type,
- test_head_returns_truthy_value,
- test_head_with_custom_header,
- test_head_with_integer_status,
- test_head_with_location_header,
- test_head_with_location_object,
- test_head_with_no_content,
- test_head_with_status_code_first,
- test_head_with_string_status,
- test_head_with_symbolic_status,
- test_head_with_www_authenticate_header
Instance Public methods
setup()
Link
test_head_created()
Link
test_head_created_with_application_json_content_type()
Link
# File actionpack/test/controller/render_test.rb, line 566 def test_head_created_with_application_json_content_type post :head_created_with_application_json_content_type assert @response.body.blank? assert_equal "application/json", @response.header["Content-Type"] assert_response :created end
test_head_ok_with_image_png_content_type()
Link
test_head_returns_truthy_value()
Link
test_head_with_custom_header()
Link
test_head_with_integer_status()
Link
test_head_with_location_header()
Link
test_head_with_location_object()
Link
# File actionpack/test/controller/render_test.rb, line 587 def test_head_with_location_object with_routing do |set| set.draw do resources :customers get ':controller/:action' end get :head_with_location_object assert @response.body.blank? assert_equal "http://www.nextangle.com/customers/1", @response.headers["Location"] assert_response :ok end end
test_head_with_no_content()
Link
test_head_with_status_code_first()
Link
# File actionpack/test/controller/render_test.rb, line 658 def test_head_with_status_code_first get :head_with_status_code_first assert_equal 403, @response.response_code assert_equal "Forbidden", @response.message assert_equal "something", @response.headers["X-Custom-Header"] assert_response :forbidden end
test_head_with_string_status()
Link
test_head_with_symbolic_status()
Link
# File actionpack/test/controller/render_test.rb, line 615 def test_head_with_symbolic_status get :head_with_symbolic_status, :status => "ok" assert_equal 200, @response.status assert_response :ok get :head_with_symbolic_status, :status => "not_found" assert_equal 404, @response.status assert_response :not_found get :head_with_symbolic_status, :status => "no_content" assert_equal 204, @response.status assert !@response.headers.include?('Content-Length') assert_response :no_content Rack::Utils::SYMBOL_TO_STATUS_CODE.each do |status, code| get :head_with_symbolic_status, :status => status.to_s assert_equal code, @response.response_code assert_response status end end
test_head_with_www_authenticate_header()
Link