diff options
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/configuration_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index d96d8ded6b..ebcfcb1c3a 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -417,6 +417,19 @@ module ApplicationTests end end + test "raise when secrets.secret_key_base is not a type of string" do + app_file 'config/secrets.yml', <<-YAML + development: + secret_key_base: 123 + YAML + + app 'development' + + assert_raise(ArgumentError) do + app.key_generator + end + end + test "prefer secrets.secret_token over config.secret_token" do app_file 'config/initializers/secret_token.rb', <<-RUBY Rails.application.config.secret_token = "" |