Skip to content

Commit

Permalink
Adds WithoutRouterTest
Browse files Browse the repository at this point in the history
Co-Authored-By: Hartley McGuire <[email protected]>
  • Loading branch information
Schwad and skipkayhil committed Mar 6, 2025
1 parent 85d449b commit 807ea93
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions actionpack/test/controller/base_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,29 @@ def action_missing(action)
end
end

class WithoutRouterController < ActionController::Base
after_action :log_request_details

def index
head :ok
end

private
def log_request_details
request.route_uri_pattern
end
end

class WithoutRouterTest < ActionController::TestCase
tests CallbackRequestAvailabilityController

def test_request_route_uri_pattern_in_after_action_callback
assert_nothing_raised do
get :index
end
end
end

class ControllerClassTests < ActiveSupport::TestCase
def test_controller_path
assert_equal "empty", EmptyController.controller_path
Expand Down

0 comments on commit 807ea93

Please sign in to comment.