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 | 8 |
1 files changed, 6 insertions, 2 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 509bd60564..ff41fef9e9 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 @@ -1,7 +1,11 @@ require 'test_helper' <% module_namespacing do -%> -class <%= class_name %>ControllerTest < ActionController::TestCase +class <%= class_name %>ControllerTest < ActionDispatch::IntegrationTest +<% if mountable_engine? -%> + include Engine.routes.url_helpers + +<% end -%> <% if actions.empty? -%> # test "the truth" do # assert true @@ -9,7 +13,7 @@ class <%= class_name %>ControllerTest < ActionController::TestCase <% else -%> <% actions.each do |action| -%> test "should get <%= action %>" do - get :<%= action %> + get <%= url_helper_prefix %>_<%= action %>_url assert_response :success end |