aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorArun Agrawal <arun@fromjaipur.com>2011-08-01 20:31:19 +0530
committerArun Agrawal <arun@fromjaipur.com>2011-08-03 20:14:50 +0530
commit3c7b29da1b1fff83fb72a19426193332eaf63577 (patch)
tree7a3d87d7f91cd92ed52dc710b4a2fc6e38b7ab95 /railties/test
parent6b3af028acdd8c97b7b6088117a042ddfd7f3038 (diff)
downloadrails-3c7b29da1b1fff83fb72a19426193332eaf63577.tar.gz
rails-3c7b29da1b1fff83fb72a19426193332eaf63577.tar.bz2
rails-3c7b29da1b1fff83fb72a19426193332eaf63577.zip
Test added to check mass_assignment_sanitizer is not present if --skip-active-record provided.
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/app_generator_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index fb7ebaa1fa..0db9b99234 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -314,6 +314,15 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
end
+ def test_generated_environments_file_for_sanitizer
+ run_generator [destination_root, "--skip-active-record"]
+ ["config/environments/development.rb", "config/environments/test.rb"].each do |env_file|
+ assert_file env_file do |file|
+ assert_no_match(/config.active_record.mass_assignment_sanitizer = :strict/, file)
+ end
+ end
+ end
+
protected
def action(*args, &block)