diff options
Diffstat (limited to 'railties/lib/rails/generators/test_unit/controller')
| -rw-r--r-- | railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb b/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb index 62c7e2f011..4f2ceb8589 100644 --- a/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb +++ b/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb @@ -3,9 +3,7 @@ require 'test_helper' <% module_namespacing do -%> class <%= class_name %>ControllerTest < ActionDispatch::IntegrationTest <% if mountable_engine? -%> - setup do - @routes = Engine.routes - end + include Engine.routes.url_helpers <% end -%> <% if actions.empty? -%> @@ -15,7 +13,7 @@ class <%= class_name %>ControllerTest < ActionDispatch::IntegrationTest <% else -%> <% actions.each do |action| -%> test "should get <%= action %>" do - get url_for(action: :<%= action %>) + get <%= file_name %>_<%= action %>_url assert_response :success end |
