Fix support for special characters in various environment variables (#35314)
Co-authored-by: Matt Jankowski <matt@jankowski.online>
This commit is contained in:
parent
f96743fcfb
commit
1151b05c2d
6 changed files with 43 additions and 21 deletions
22
spec/configuration/email_spec.rb
Normal file
22
spec/configuration/email_spec.rb
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Configuration for email', type: :feature do
|
||||
context 'with special characters in SMTP_PASSWORD env variable' do
|
||||
let(:password) { ']]123456789[["!:@<>/\\=' }
|
||||
|
||||
around do |example|
|
||||
ClimateControl.modify SMTP_PASSWORD: password do
|
||||
example.run
|
||||
end
|
||||
end
|
||||
|
||||
it 'parses value correctly' do
|
||||
expect(Rails.application.config_for(:email, env: :production))
|
||||
.to include(
|
||||
smtp_settings: include(password: password)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue