aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb')
-rw-r--r--railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb8
1 files changed, 3 insertions, 5 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 5a8a3ca5e0..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
@@ -1,11 +1,9 @@
require 'test_helper'
<% module_namespacing do -%>
-class <%= class_name %>ControllerTest < ActionController::TestCase
+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 < ActionController::TestCase
<% else -%>
<% actions.each do |action| -%>
test "should get <%= action %>" do
- get :<%= action %>
+ get <%= file_name %>_<%= action %>_url
assert_response :success
end