From c9d15a20fbf85585b56973614e2ee555cd88d8fe Mon Sep 17 00:00:00 2001 From: Wabo Date: Wed, 3 Jun 2026 17:01:53 -0400 Subject: [PATCH] Fix hash alignment in specs by putting opening brace on separate line --- spec/requests/sms_settings_spec.rb | 44 +++++++++++++++++----------- spec/system/sms_settings_spec.rb | 46 +++++++++++++++++++++--------- 2 files changed, 60 insertions(+), 30 deletions(-) diff --git a/spec/requests/sms_settings_spec.rb b/spec/requests/sms_settings_spec.rb index 066c8289..fdb1d204 100644 --- a/spec/requests/sms_settings_spec.rb +++ b/spec/requests/sms_settings_spec.rb @@ -52,10 +52,13 @@ RSpec.describe 'SMS Settings', type: :request do it 'preserves existing Twilio auth token when blank is submitted' do create(:encrypted_config, account:, key: EncryptedConfig::SMS_CONFIGS_KEY, - value: { 'enabled' => true, 'provider' => 'twilio', - 'twilio_account_sid' => 'AC123', - 'twilio_auth_token' => 'keep_me', - 'twilio_from' => '+15551234567' }) + value: { + 'enabled' => true, + 'provider' => 'twilio', + 'twilio_account_sid' => 'AC123', + 'twilio_auth_token' => 'keep_me', + 'twilio_from' => '+15551234567' + }) post settings_sms_path, params: { encrypted_config: { @@ -75,9 +78,12 @@ RSpec.describe 'SMS Settings', type: :request do it 'preserves existing BulkVS basic_auth_token when blank is submitted' do create(:encrypted_config, account:, key: EncryptedConfig::SMS_CONFIGS_KEY, - value: { 'enabled' => true, 'provider' => 'bulkvs', - 'basic_auth_token' => 'keep_me', - 'from_number' => '15551234567' }) + value: { + 'enabled' => true, + 'provider' => 'bulkvs', + 'basic_auth_token' => 'keep_me', + 'from_number' => '15551234567' + }) post settings_sms_path, params: { encrypted_config: { @@ -91,10 +97,13 @@ RSpec.describe 'SMS Settings', type: :request do it 'preserves existing VoIP.ms API password when blank is submitted' do create(:encrypted_config, account:, key: EncryptedConfig::SMS_CONFIGS_KEY, - value: { 'enabled' => true, 'provider' => 'voipms', - 'voipms_api_username' => 'user@example.com', - 'voipms_api_password' => 'keep_me', - 'voipms_did' => '5551234567' }) + value: { + 'enabled' => true, + 'provider' => 'voipms', + 'voipms_api_username' => 'user@example.com', + 'voipms_api_password' => 'keep_me', + 'voipms_did' => '5551234567' + }) post settings_sms_path, params: { encrypted_config: { @@ -111,11 +120,14 @@ RSpec.describe 'SMS Settings', type: :request do it 'preserves existing SignalWire API token when blank is submitted' do create(:encrypted_config, account:, key: EncryptedConfig::SMS_CONFIGS_KEY, - value: { 'enabled' => true, 'provider' => 'signalwire', - 'signalwire_space_url' => 'test.signalwire.com', - 'signalwire_project_id' => 'uuid-1234', - 'signalwire_api_token' => 'keep_me', - 'signalwire_from' => '+15551234567' }) + value: { + 'enabled' => true, + 'provider' => 'signalwire', + 'signalwire_space_url' => 'test.signalwire.com', + 'signalwire_project_id' => 'uuid-1234', + 'signalwire_api_token' => 'keep_me', + 'signalwire_from' => '+15551234567' + }) post settings_sms_path, params: { encrypted_config: { diff --git a/spec/system/sms_settings_spec.rb b/spec/system/sms_settings_spec.rb index 5b8d5fc2..eca00e87 100644 --- a/spec/system/sms_settings_spec.rb +++ b/spec/system/sms_settings_spec.rb @@ -32,10 +32,13 @@ RSpec.describe 'SMS Settings' do it 'shows the test SMS section when SMS is configured and enabled' do create(:encrypted_config, account:, key: EncryptedConfig::SMS_CONFIGS_KEY, - value: { 'enabled' => true, 'provider' => 'twilio', - 'twilio_account_sid' => 'AC123', - 'twilio_auth_token' => 'token', - 'twilio_from' => '+15551234567' }) + value: { + 'enabled' => true, + 'provider' => 'twilio', + 'twilio_account_sid' => 'AC123', + 'twilio_auth_token' => 'token', + 'twilio_from' => '+15551234567' + }) visit settings_sms_path @@ -55,8 +58,12 @@ RSpec.describe 'SMS Settings' do context 'when SMS is enabled' do before do create(:encrypted_config, account:, key: EncryptedConfig::SMS_CONFIGS_KEY, - value: { 'enabled' => true, 'provider' => 'bulkvs', - 'basic_auth_token' => 'tok', 'from_number' => '15551234567' }) + value: { + 'enabled' => true, + 'provider' => 'bulkvs', + 'basic_auth_token' => 'tok', + 'from_number' => '15551234567' + }) end it 'shows the provider section on page load' do @@ -78,8 +85,12 @@ RSpec.describe 'SMS Settings' do it 'hides the provider section when the toggle is turned off' do create(:encrypted_config, account:, key: EncryptedConfig::SMS_CONFIGS_KEY, - value: { 'enabled' => true, 'provider' => 'bulkvs', - 'basic_auth_token' => 'tok', 'from_number' => '15551234567' }) + value: { + 'enabled' => true, + 'provider' => 'bulkvs', + 'basic_auth_token' => 'tok', + 'from_number' => '15551234567' + }) visit settings_sms_path @@ -94,8 +105,12 @@ RSpec.describe 'SMS Settings' do describe 'provider switching' do before do create(:encrypted_config, account:, key: EncryptedConfig::SMS_CONFIGS_KEY, - value: { 'enabled' => true, 'provider' => 'bulkvs', - 'basic_auth_token' => 'tok', 'from_number' => '15551234567' }) + value: { + 'enabled' => true, + 'provider' => 'bulkvs', + 'basic_auth_token' => 'tok', + 'from_number' => '15551234567' + }) visit settings_sms_path end @@ -151,10 +166,13 @@ RSpec.describe 'SMS Settings' do it 'retains existing Twilio auth token when left blank on re-save' do create(:encrypted_config, account:, key: EncryptedConfig::SMS_CONFIGS_KEY, - value: { 'enabled' => true, 'provider' => 'twilio', - 'twilio_account_sid' => 'AC123', - 'twilio_auth_token' => 'secret_token', - 'twilio_from' => '+15551234567' }) + value: { + 'enabled' => true, + 'provider' => 'twilio', + 'twilio_account_sid' => 'AC123', + 'twilio_auth_token' => 'secret_token', + 'twilio_from' => '+15551234567' + }) visit settings_sms_path