71672dfa6a
This replaces the use of fake_application_settings with
`::ApplicationSetting.build`_from_defaults. The reason is that
`fake_application_settings` doesn't have the custom accessors that
`ApplicationSetting` has, e.g. `#commit_email_hostname`, thus this
can lead to unexpected `nil` values which comes from the database
column instead of `.default_commit_email_hostname` returned by
`ApplicationSetting#commit_email_hostname`.
Using `::ApplicationSetting.build_from_defaults` should be safe as it
doesn't try to `INSERT` a DB record, in contrary to
`::ApplicationSetting.create_from_defaults` which we used to use, and
which created issues that the introduction of
`fake_application_settings` tried to resolve (
|
||
---|---|---|
.. | ||
bin | ||
config | ||
controllers | ||
db | ||
dependencies | ||
factories | ||
features | ||
finders | ||
fixtures | ||
frontend | ||
graphql | ||
helpers | ||
initializers | ||
javascripts | ||
lib | ||
mailers | ||
migrations | ||
models | ||
policies | ||
presenters | ||
rack_servers | ||
requests | ||
routing | ||
rubocop | ||
serializers | ||
services | ||
sidekiq/cron | ||
support | ||
tasks | ||
uploaders | ||
validators | ||
views | ||
workers | ||
factories_spec.rb | ||
fast_spec_helper.rb | ||
rails_helper.rb | ||
rake_helper.rb | ||
simplecov_env.rb | ||
spec_helper.rb |