diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-04-16 15:19:41 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-04-16 15:19:41 +0900 |
commit | aa757d0c1151f83104da241f30b1924d748a5d78 (patch) | |
tree | 40c4c78e9095bf2c3bfa842f36196ff9f8dbdcb2 /railties/test/generators | |
parent | 39e087cbf5628ecc351fc86a3a1e320be193bf29 (diff) | |
download | rails-aa757d0c1151f83104da241f30b1924d748a5d78.tar.gz rails-aa757d0c1151f83104da241f30b1924d748a5d78.tar.bz2 rails-aa757d0c1151f83104da241f30b1924d748a5d78.zip |
don't remove `cable.js`
`cable.js` is required for other Channels.
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/channel_generator_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/test/generators/channel_generator_test.rb b/railties/test/generators/channel_generator_test.rb index 23d0c7b4a4..d58b54ac24 100644 --- a/railties/test/generators/channel_generator_test.rb +++ b/railties/test/generators/channel_generator_test.rb @@ -46,4 +46,16 @@ class ChannelGeneratorTest < Rails::Generators::TestCase assert_file "app/assets/javascripts/cable.js" end + + def test_channel_on_revoke + run_generator ['chat'] + run_generator ['chat'], behavior: :revoke + + assert_no_file "app/channels/chat_channel.rb" + assert_no_file "app/assets/javascripts/channels/chat.coffee" + + assert_file "app/channels/application_cable/channel.rb" + assert_file "app/channels/application_cable/connection.rb" + assert_file "app/assets/javascripts/cable.js" + end end |