scinote-web/config/environments/test.rb

92 lines
3.1 KiB
Ruby
Raw Normal View History

2016-02-12 23:52:43 +08:00
Rails.application.configure do
# Verifies that versions and hashed value of the package contents in the project's package.json
config.webpacker.check_yarn_integrity = false
2017-08-30 22:18:21 +08:00
2016-02-12 23:52:43 +08:00
# Settings specified here will take precedence over those in config/application.rb.
2017-06-23 21:19:08 +08:00
# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
}
2016-02-12 23:52:43 +08:00
# Enable this to be able to output stuff to STDOUT during tests
# via Rails::logger.info "..."
config.logger = Logger.new(STDOUT)
config.log_level = :info
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true
# Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that
# preloads Rails for running tests, you may have to set it to true.
config.eager_load = false
# Configure static file server for tests with Cache-Control for performance.
config.serve_static_files = true
config.static_cache_control = 'public, max-age=3600'
# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false
# Store uploaded files on the local file system in a temporary directory
config.active_storage.service = :test
config.action_mailer.perform_caching = false
2016-02-12 23:52:43 +08:00
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
2019-08-26 21:05:24 +08:00
config.action_mailer.perform_deliveries = true
Rails.application.routes.default_url_options = {
host: Rails.application.secrets.mail_server_url
}
2016-02-12 23:52:43 +08:00
# Don't care if the mailer can't send.
2019-08-26 21:05:24 +08:00
config.action_mailer.raise_delivery_errors = true
2016-02-12 23:52:43 +08:00
# Randomize the order test cases are executed.
config.active_support.test_order = :random
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
config.logger = Logger.new(STDOUT)
config.log_level = :error
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
2017-02-27 16:40:01 +08:00
# Enable/disable Deface
config.deface.enabled = ENV['DEFACE_ENABLED'] != 'false'
2017-02-27 16:40:01 +08:00
2016-11-22 21:57:41 +08:00
# Enable reCAPTCHA
config.x.enable_recaptcha = false
# Enable email confirmations
config.x.enable_email_confirmations = false
# Enable user registrations
config.x.enable_user_registration = true
2017-07-06 15:07:05 +08:00
2018-04-04 21:29:20 +08:00
# disable sign in with LinkedIn account
config.x.linkedin_signin_enabled = false
# enable assets compiling
config.assets.compile = true
2016-02-12 23:52:43 +08:00
end