class TestRouteDefaults

Constants

APP
Routes

Public Instance Methods

app() click to toggle source
# File actionpack/test/dispatch/routing_test.rb, line 4626
def app
  APP
end
test_route_defaults_are_not_required_for_url_for() click to toggle source
# File actionpack/test/dispatch/routing_test.rb, line 4640
def test_route_defaults_are_not_required_for_url_for
  assert_equal "/projects/1", url_for(controller: "projects", action: "show", id: 1, only_path: true)
end
test_route_options_are_required_for_url_for() click to toggle source
# File actionpack/test/dispatch/routing_test.rb, line 4632
def test_route_options_are_required_for_url_for
  assert_raises(ActionController::UrlGenerationError) do
    assert_equal "/posts/1", url_for(controller: "posts", action: "show", id: 1, only_path: true)
  end

  assert_equal "/posts/1", url_for(controller: "posts", action: "show", id: 1, bucket_type: "post", only_path: true)
end