aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-01-06 15:01:14 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-01-06 15:12:19 +0900
commit229064cf3a4da96ad3e30114d99288bf6660ed58 (patch)
treebc6d2b058bf4e1dff59cca4871be23f09ca8ed8f /railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb
parent333aab3d51124a00c7f2ba498d4910eb7cb570e6 (diff)
downloadrails-229064cf3a4da96ad3e30114d99288bf6660ed58.tar.gz
rails-229064cf3a4da96ad3e30114d99288bf6660ed58.tar.bz2
rails-229064cf3a4da96ad3e30114d99288bf6660ed58.zip
make generated controller test work correctly
Since the `#file_name` that not consideration for the namespace, if generate a controller with a namespace, not the correct url helper generation, it had become an error to run the test. Modified to generate the correct url helper, even if it is produced a namespace with controller.
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.rb2
1 files changed, 1 insertions, 1 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 4f2ceb8589..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
@@ -13,7 +13,7 @@ class <%= class_name %>ControllerTest < ActionDispatch::IntegrationTest
<% else -%>
<% actions.each do |action| -%>
test "should get <%= action %>" do
- get <%= file_name %>_<%= action %>_url
+ get <%= url_helper_prefix %>_<%= action %>_url
assert_response :success
end