diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-04-22 13:22:23 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-22 13:22:23 +0900 |
commit | cc1526171ed8ab59a2d5eeb15a07f8cf4bbd366f (patch) | |
tree | f25659e1d7dd9b9730ae8c30ec5560433014bf2c /railties | |
parent | 58e18c1aaf136e80dead3a93fc0a301066768767 (diff) | |
parent | 4ee80f25ce9790c6eaedb2da27d0f25b397aa93d (diff) | |
download | rails-cc1526171ed8ab59a2d5eeb15a07f8cf4bbd366f.tar.gz rails-cc1526171ed8ab59a2d5eeb15a07f8cf4bbd366f.tar.bz2 rails-cc1526171ed8ab59a2d5eeb15a07f8cf4bbd366f.zip |
Merge pull request #32687 from yhirano55/add-generator-test-case-to-channel
Add test case to ChannelGeneratorTest
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/generators/channel_generator_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/test/generators/channel_generator_test.rb b/railties/test/generators/channel_generator_test.rb index e238197eba..e543cc11b8 100644 --- a/railties/test/generators/channel_generator_test.rb +++ b/railties/test/generators/channel_generator_test.rb @@ -76,4 +76,14 @@ class ChannelGeneratorTest < Rails::Generators::TestCase assert_file "app/channels/application_cable/connection.rb" assert_file "app/assets/javascripts/cable.js" end + + def test_channel_suffix_is_not_duplicated + run_generator ["chat_channel"] + + assert_no_file "app/channels/chat_channel_channel.rb" + assert_file "app/channels/chat_channel.rb" + + assert_no_file "app/assets/javascripts/channels/chat_channel.js" + assert_file "app/assets/javascripts/channels/chat.js" + end end |