diff options
author | Yoshiyuki Hirano <yhirano@me.com> | 2017-08-23 05:59:05 +0900 |
---|---|---|
committer | Yoshiyuki Hirano <yhirano@me.com> | 2017-08-23 06:48:13 +0900 |
commit | ac345f5dadc31a63239e0705dcacc51ef74fdd61 (patch) | |
tree | 2ef8d0e7cc49a1bb7343a8a8bfc5bc0c2ed84fc3 /railties/test | |
parent | 3580edc9faf5cc0a0e467911d0a4dc4faf153709 (diff) | |
download | rails-ac345f5dadc31a63239e0705dcacc51ef74fdd61.tar.gz rails-ac345f5dadc31a63239e0705dcacc51ef74fdd61.tar.bz2 rails-ac345f5dadc31a63239e0705dcacc51ef74fdd61.zip |
Fix indentation in the template for secrets
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/encrypted_secrets_generator_test.rb | 4 | ||||
-rw-r--r-- | railties/test/secrets_test.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/railties/test/generators/encrypted_secrets_generator_test.rb b/railties/test/generators/encrypted_secrets_generator_test.rb index 205827e498..eacb5166c0 100644 --- a/railties/test/generators/encrypted_secrets_generator_test.rb +++ b/railties/test/generators/encrypted_secrets_generator_test.rb @@ -17,8 +17,8 @@ class EncryptedSecretsGeneratorTest < Rails::Generators::TestCase assert_file "config/secrets.yml.key", /\w+/ assert File.exist?("config/secrets.yml.enc") - assert_no_match(/production:\n# external_api_key: \w+/, IO.binread("config/secrets.yml.enc")) - assert_match(/production:\n# external_api_key: \w+/, Rails::Secrets.read) + assert_no_match(/# production:\n# external_api_key: \w+/, IO.binread("config/secrets.yml.enc")) + assert_match(/# production:\n# external_api_key: \w+/, Rails::Secrets.read) end def test_appends_to_gitignore diff --git a/railties/test/secrets_test.rb b/railties/test/secrets_test.rb index 445e216f16..ff6f955a78 100644 --- a/railties/test/secrets_test.rb +++ b/railties/test/secrets_test.rb @@ -47,7 +47,7 @@ class Rails::SecretsTest < ActiveSupport::TestCase ENV["RAILS_MASTER_KEY"] = IO.binread("config/secrets.yml.key").strip FileUtils.rm("config/secrets.yml.key") - assert_match "production:\n# external_api_key", Rails::Secrets.read + assert_match "# production:\n# external_api_key:", Rails::Secrets.read ensure ENV["RAILS_MASTER_KEY"] = old_key end @@ -69,7 +69,7 @@ class Rails::SecretsTest < ActiveSupport::TestCase Rails::Secrets.read_for_editing do |tmp_path| decrypted_path = tmp_path - assert_match(/production:\n# external_api_key/, File.read(tmp_path)) + assert_match(/# production:\n# external_api_key/, File.read(tmp_path)) File.write(tmp_path, "Empty streets, empty nights. The Downtown Lights.") end |