diff options
Diffstat (limited to 'railties/test/generators/api_app_generator_test.rb')
-rw-r--r-- | railties/test/generators/api_app_generator_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/railties/test/generators/api_app_generator_test.rb b/railties/test/generators/api_app_generator_test.rb index 2c24a6e46a..1ea5661006 100644 --- a/railties/test/generators/api_app_generator_test.rb +++ b/railties/test/generators/api_app_generator_test.rb @@ -52,6 +52,16 @@ class ApiAppGeneratorTest < Rails::Generators::TestCase assert_file "app/controllers/application_controller.rb", /ActionController::API/ end + def test_generator_if_skip_action_cable_is_given + run_generator [destination_root, "--skip-action-cable"] + assert_file "config/application.rb", /#\s+require\s+["']action_cable\/engine["']/ + assert_no_file "config/cable.yml" + assert_no_file "app/channels" + assert_file "Gemfile" do |content| + assert_no_match(/redis/, content) + end + end + private def default_files @@ -89,6 +99,7 @@ class ApiAppGeneratorTest < Rails::Generators::TestCase config/initializers/cookies_serializer.rb config/initializers/session_store.rb config/initializers/request_forgery_protection.rb + config/initializers/per_form_csrf_tokens.rb lib/assets vendor/assets test/helpers |