Add a test for assert_recognizes on ActionDispatch::IntegrationTest [#4390 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
parent
5c9d23f870
commit
ed0ca5db9e
|
@ -143,6 +143,12 @@ class BasicController
|
|||
end
|
||||
end
|
||||
|
||||
class ActionDispatch::IntegrationTest < ActiveSupport::TestCase
|
||||
setup do
|
||||
@routes = SharedTestRoutes
|
||||
end
|
||||
end
|
||||
|
||||
class ActionController::IntegrationTest < ActiveSupport::TestCase
|
||||
def self.build_app(routes = nil)
|
||||
RoutedRackApp.new(routes || ActionDispatch::Routing::RouteSet.new) do |middleware|
|
||||
|
@ -275,4 +281,4 @@ module ActionController
|
|||
class Base
|
||||
include SharedTestRoutes.url_helpers
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1000,6 +1000,12 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
|
|||
end
|
||||
end
|
||||
|
||||
def test_assert_recognizes_account_overview
|
||||
with_test_routes do
|
||||
assert_recognizes({:controller => "account", :action => "overview"}, "/account/overview")
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def with_test_routes
|
||||
yield
|
||||
|
|
Loading…
Reference in New Issue