aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2018-02-09 13:51:20 -0500
committerRafael Mendonça França <rafaelmfranca@gmail.com>2018-02-09 13:51:20 -0500
commitc92ea62792083af8130d9d24f70b9c8ea7badb0b (patch)
tree8c05044a7b57fff31a46fdc3ae32c230f479dc32 /actionpack/test
parent80cc0d323ba08a51d4299cb4fc34f157818fead4 (diff)
downloadrails-c92ea62792083af8130d9d24f70b9c8ea7badb0b.tar.gz
rails-c92ea62792083af8130d9d24f70b9c8ea7badb0b.tar.bz2
rails-c92ea62792083af8130d9d24f70b9c8ea7badb0b.zip
Make sure assert_recognizes can still find routes mounted after engines
Before, if the application defined after an engine this method would not recognize the route since it was not defined insdie the engine.
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/dispatch/routing_assertions_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_assertions_test.rb b/actionpack/test/dispatch/routing_assertions_test.rb
index a5198f2f13..009b6d9bc3 100644
--- a/actionpack/test/dispatch/routing_assertions_test.rb
+++ b/actionpack/test/dispatch/routing_assertions_test.rb
@@ -52,6 +52,8 @@ class RoutingAssertionsTest < ActionController::TestCase
end
mount engine => "/shelf"
+
+ get "/shelf/foo", controller: "query_articles", action: "index"
end
end
@@ -154,6 +156,10 @@ class RoutingAssertionsTest < ActionController::TestCase
assert_match err.message, "This is a really bad msg"
end
+ def test_assert_recognizes_continue_to_recoginize_after_it_tried_engines
+ assert_recognizes({ controller: "query_articles", action: "index" }, "/shelf/foo")
+ end
+
def test_assert_routing
assert_routing("/articles", controller: "articles", action: "index")
end