class UrlHelperControllerTest

Public Instance Methods

test_named_route_path_shows_only_path() click to toggle source
# File actionview/test/template/url_helper_test.rb, line 777
def test_named_route_path_shows_only_path
  get :show_named_route, params: { kind: "path" }
  assert_equal "/url_helper_controller_test/url_helper/show_named_route", @response.body
end
test_named_route_should_show_host_and_path_using_controller_default_url_options() click to toggle source
# File actionview/test/template/url_helper_test.rb, line 787
def test_named_route_should_show_host_and_path_using_controller_default_url_options
  class << @controller
    def default_url_options
      { host: "testtwo.host" }
    end
  end

  get :show_named_route, params: { kind: "url" }
  assert_equal "http://testtwo.host/url_helper_controller_test/url_helper/show_named_route", @response.body
end
test_named_route_url_shows_host_and_path() click to toggle source
# File actionview/test/template/url_helper_test.rb, line 771
def test_named_route_url_shows_host_and_path
  get :show_named_route, params: { kind: "url" }
  assert_equal "http://test.host/url_helper_controller_test/url_helper/show_named_route",
    @response.body
end
test_recall_params_should_be_normalized() click to toggle source
# File actionview/test/template/url_helper_test.rb, line 798
def test_recall_params_should_be_normalized
  get :normalize_recall_params
  assert_equal "/url_helper_controller_test/url_helper/normalize_recall_params", @response.body
end
test_recall_params_should_normalize_id() click to toggle source
# File actionview/test/template/url_helper_test.rb, line 808
def test_recall_params_should_normalize_id
  get :show, params: { id: "123" }
  assert_equal 302, @response.status
  assert_equal "http://test.host/url_helper_controller_test/url_helper/profile/123", @response.location

  get :show, params: { name: "123" }
  assert_equal "ok", @response.body
end
test_recall_params_should_not_be_changed() click to toggle source
# File actionview/test/template/url_helper_test.rb, line 803
def test_recall_params_should_not_be_changed
  get :recall_params_not_changed
  assert_equal "/url_helper_controller_test/url_helper/show_url_for", @response.body
end
test_url_for_nil_returns_current_path() click to toggle source
# File actionview/test/template/url_helper_test.rb, line 782
def test_url_for_nil_returns_current_path
  get :nil_url_for
  assert_equal "/url_helper_controller_test/url_helper/nil_url_for", @response.body
end
test_url_for_shows_only_path() click to toggle source
# File actionview/test/template/url_helper_test.rb, line 766
def test_url_for_shows_only_path
  get :show_url_for
  assert_equal "/url_helper_controller_test/url_helper/show_url_for", @response.body
end
test_url_helper_can_be_overridden() click to toggle source
# File actionview/test/template/url_helper_test.rb, line 817
def test_url_helper_can_be_overridden
  get :override_url_helper
  assert_equal "/url_helper_controller_test/url_helper/override_url_helper/override", @response.body
end