Skip to content

Commit

Permalink
Fix secret_key_base for Railties
Browse files Browse the repository at this point in the history
This was missed in the security fix for local dev. CI doesn't have a tmp
directory in the apps built for testing so these end up failing. This
adds the secret_key_base so we don't need to generate one.
  • Loading branch information
eileencodes committed Mar 13, 2019
1 parent 7a9d8c6 commit cb9476a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions railties/test/application/url_generation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class MyApp < Rails::Application
config.session_store :cookie_store, key: "_myapp_session"
config.active_support.deprecation = :log
config.eager_load = false
config.secret_key_base = "b3c631c314c0bbca50c1b2843150fe33"
end

Rails.application.initialize!
Expand Down
1 change: 1 addition & 0 deletions railties/test/path_generation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def self.name; "ScriptNameTestApp"; end
def initialize
super
app = self
app.config.secret_key_base = "b3c631c314c0bbca50c1b2843150fe33"
@routes = TestSet.new ->(c) { app.controller = c }
secrets.secret_token = "foo"
end
Expand Down
1 change: 1 addition & 0 deletions railties/test/rails_info_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Base

class InfoControllerTest < ActionController::TestCase
tests Rails::InfoController
Rails.application.config.secret_key_base = "b3c631c314c0bbca50c1b2843150fe33"

def setup
Rails.application.routes.draw do
Expand Down

0 comments on commit cb9476a

Please sign in to comment.