diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-12-12 11:39:15 -0500 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-12-12 14:59:11 -0500 |
commit | 39fd0be7660e2f666328af85c705c3df5a8ac09e (patch) | |
tree | 0993e1a4ede3aa0cb95621c0f002ed9e4e18335a /railties | |
parent | 404314779263e120ce0da5ae62f09c19114476d7 (diff) | |
download | rails-39fd0be7660e2f666328af85c705c3df5a8ac09e.tar.gz rails-39fd0be7660e2f666328af85c705c3df5a8ac09e.tar.bz2 rails-39fd0be7660e2f666328af85c705c3df5a8ac09e.zip |
Add test for custom tokens stored in config/tokens.yml
Diffstat (limited to 'railties')
-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 1f3127b069..6554e0e08a 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -323,6 +323,19 @@ module ApplicationTests assert_equal '3b7cd727ee24e8444053437c36cc66c3', app.secrets.secret_key_base end + test "custom secrets saved in config/tokens.yml are loaded in app secrets" do + app_file 'config/tokens.yml', <<-YAML + development: + secret_key_base: 3b7cd727ee24e8444053437c36cc66c3 + aws_access_key_id: myamazonaccesskeyid + aws_secret_access_key: myamazonsecretaccesskey + YAML + + require "#{app_path}/config/environment" + assert_equal 'myamazonaccesskeyid', app.secrets.aws_access_key_id + assert_equal 'myamazonsecretaccesskey', app.secrets.aws_secret_access_key + end + test "protect from forgery is the default in a new app" do make_basic_app |