Permalink
Browse files

Add test for custom tokens stored in config/tokens.yml

  • Loading branch information...
guilleiguaran committed Dec 12, 2013
1 parent 4043147 commit 39fd0be7660e2f666328af85c705c3df5a8ac09e
Showing with 13 additions and 0 deletions.
  1. +13 −0 railties/test/application/configuration_test.rb
@@ -323,6 +323,19 @@ def index
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

0 comments on commit 39fd0be

Please sign in to comment.