Namespace
Methods
S
T
Included Modules
Instance Public methods
setup()
# File actionpack/test/controller/integration_test.rb, line 761
def setup
  @app = Poller
end
test_failed_get()
# File actionpack/test/controller/integration_test.rb, line 773
def test_failed_get
  get "/failure"
  assert_response 404
  assert_response :not_found
  assert_equal '', response.body
end
test_generate_url_without_controller()
# File actionpack/test/controller/integration_test.rb, line 780
def test_generate_url_without_controller
  assert_equal 'http://www.example.com/foo', url_for(:controller => "foo")
end
test_ignores_common_ports_in_host()
# File actionpack/test/controller/integration_test.rb, line 806
def test_ignores_common_ports_in_host
  get "http://test.com"
  assert_equal "test.com", @request.env["HTTP_HOST"]

  get "https://test.com"
  assert_equal "test.com", @request.env["HTTP_HOST"]
end
test_keeps_uncommon_ports_in_host()
# File actionpack/test/controller/integration_test.rb, line 814
def test_keeps_uncommon_ports_in_host
  get "http://test.com:123"
  assert_equal "test.com:123", @request.env["HTTP_HOST"]

  get "http://test.com:443"
  assert_equal "test.com:443", @request.env["HTTP_HOST"]

  get "https://test.com:80"
  assert_equal "test.com:80", @request.env["HTTP_HOST"]
end
test_pass_env()
# File actionpack/test/controller/integration_test.rb, line 799
def test_pass_env
  get "/success", env: { "HTTP_REFERER" => "http://test.com/", "HTTP_HOST" => "http://test.com" }

  assert_equal "http://test.com", @request.env["HTTP_HOST"]
  assert_equal "http://test.com/", @request.env["HTTP_REFERER"]
end
test_pass_headers()
# File actionpack/test/controller/integration_test.rb, line 784
def test_pass_headers
  get "/success", headers: {"Referer" => "http://www.example.com/foo", "Host" => "http://nohost.com"}

  assert_equal "http://nohost.com", @request.env["HTTP_HOST"]
  assert_equal "http://www.example.com/foo", @request.env["HTTP_REFERER"]
end
test_pass_headers_and_env()
# File actionpack/test/controller/integration_test.rb, line 791
def test_pass_headers_and_env
  get "/success", headers: { "X-Test-Header" => "value" }, env: { "HTTP_REFERER" => "http://test.com/", "HTTP_HOST" => "http://test.com" }

  assert_equal "http://test.com", @request.env["HTTP_HOST"]
  assert_equal "http://test.com/", @request.env["HTTP_REFERER"]
  assert_equal "value", @request.env["HTTP_X_TEST_HEADER"]
end
test_successful_get()
# File actionpack/test/controller/integration_test.rb, line 765
def test_successful_get
  get "/success"
  assert_response 200
  assert_response :success
  assert_response :ok
  assert_equal "Hello World!", response.body
end