Fix hash alignment in specs by putting opening brace on separate line

pull/687/head
Wabo 2 weeks ago
parent a5b0cd6a94
commit c9d15a20fb

@ -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: {

@ -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

Loading…
Cancel
Save