diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-04-22 13:23:35 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-22 13:23:35 +0900 |
commit | 26749d37fa7ceb4d1a9d98147029145e9aabfa40 (patch) | |
tree | fe9a3f0141a37468e5ed629ec36b79cd1cc19599 /railties/test | |
parent | cc1526171ed8ab59a2d5eeb15a07f8cf4bbd366f (diff) | |
parent | 8e2c91df4a8d4f336fe27ec98bd1dfd4934ac9fe (diff) | |
download | rails-26749d37fa7ceb4d1a9d98147029145e9aabfa40.tar.gz rails-26749d37fa7ceb4d1a9d98147029145e9aabfa40.tar.bz2 rails-26749d37fa7ceb4d1a9d98147029145e9aabfa40.zip |
Merge pull request #32685 from yhirano55/fix-duplicated-suffix-for-job-generator
Fix duplicated suffix for JobGenerator
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/job_generator_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/test/generators/job_generator_test.rb b/railties/test/generators/job_generator_test.rb index 13276fac65..234ba6dad7 100644 --- a/railties/test/generators/job_generator_test.rb +++ b/railties/test/generators/job_generator_test.rb @@ -35,4 +35,14 @@ class JobGeneratorTest < Rails::Generators::TestCase assert_match(/class ApplicationJob < ActiveJob::Base/, job) end end + + def test_job_suffix_is_not_duplicated + run_generator ["notifier_job"] + + assert_no_file "app/jobs/notifier_job_job.rb" + assert_file "app/jobs/notifier_job.rb" + + assert_no_file "test/jobs/notifier_job_job_test.rb" + assert_file "test/jobs/notifier_job_test.rb" + end end |