提交 4ee80f25 编写于 作者: Y Yoshiyuki Hirano

Add test case to ChannelGeneratorTest

* Add a test case to ensure avoid duplicated suffix in channel generator
上级 58e18c1a
......@@ -76,4 +76,14 @@ def test_channel_on_revoke
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册