|
|
|
@ -51,7 +51,9 @@ RSpec.describe 'SMS Settings', type: :request do
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
it 'preserves existing Twilio auth token when blank is submitted' do
|
|
|
|
it 'preserves existing Twilio auth token when blank is submitted' do
|
|
|
|
create(:encrypted_config, account:, key: EncryptedConfig::SMS_CONFIGS_KEY,
|
|
|
|
create(:encrypted_config,
|
|
|
|
|
|
|
|
account:,
|
|
|
|
|
|
|
|
key: EncryptedConfig::SMS_CONFIGS_KEY,
|
|
|
|
value: {
|
|
|
|
value: {
|
|
|
|
'enabled' => true,
|
|
|
|
'enabled' => true,
|
|
|
|
'provider' => 'twilio',
|
|
|
|
'provider' => 'twilio',
|
|
|
|
@ -77,7 +79,9 @@ RSpec.describe 'SMS Settings', type: :request do
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
it 'preserves existing BulkVS basic_auth_token when blank is submitted' do
|
|
|
|
it 'preserves existing BulkVS basic_auth_token when blank is submitted' do
|
|
|
|
create(:encrypted_config, account:, key: EncryptedConfig::SMS_CONFIGS_KEY,
|
|
|
|
create(:encrypted_config,
|
|
|
|
|
|
|
|
account:,
|
|
|
|
|
|
|
|
key: EncryptedConfig::SMS_CONFIGS_KEY,
|
|
|
|
value: {
|
|
|
|
value: {
|
|
|
|
'enabled' => true,
|
|
|
|
'enabled' => true,
|
|
|
|
'provider' => 'bulkvs',
|
|
|
|
'provider' => 'bulkvs',
|
|
|
|
@ -96,7 +100,9 @@ RSpec.describe 'SMS Settings', type: :request do
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
it 'preserves existing VoIP.ms API password when blank is submitted' do
|
|
|
|
it 'preserves existing VoIP.ms API password when blank is submitted' do
|
|
|
|
create(:encrypted_config, account:, key: EncryptedConfig::SMS_CONFIGS_KEY,
|
|
|
|
create(:encrypted_config,
|
|
|
|
|
|
|
|
account:,
|
|
|
|
|
|
|
|
key: EncryptedConfig::SMS_CONFIGS_KEY,
|
|
|
|
value: {
|
|
|
|
value: {
|
|
|
|
'enabled' => true,
|
|
|
|
'enabled' => true,
|
|
|
|
'provider' => 'voipms',
|
|
|
|
'provider' => 'voipms',
|
|
|
|
@ -108,8 +114,11 @@ RSpec.describe 'SMS Settings', type: :request do
|
|
|
|
post settings_sms_path, params: {
|
|
|
|
post settings_sms_path, params: {
|
|
|
|
encrypted_config: {
|
|
|
|
encrypted_config: {
|
|
|
|
value: {
|
|
|
|
value: {
|
|
|
|
enabled: '1', provider: 'voipms',
|
|
|
|
enabled: '1',
|
|
|
|
voipms_api_username: 'user@example.com', voipms_api_password: '', voipms_did: '5551234567'
|
|
|
|
provider: 'voipms',
|
|
|
|
|
|
|
|
voipms_api_username: 'user@example.com',
|
|
|
|
|
|
|
|
voipms_api_password: '',
|
|
|
|
|
|
|
|
voipms_did: '5551234567'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -119,7 +128,9 @@ RSpec.describe 'SMS Settings', type: :request do
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
it 'preserves existing SignalWire API token when blank is submitted' do
|
|
|
|
it 'preserves existing SignalWire API token when blank is submitted' do
|
|
|
|
create(:encrypted_config, account:, key: EncryptedConfig::SMS_CONFIGS_KEY,
|
|
|
|
create(:encrypted_config,
|
|
|
|
|
|
|
|
account:,
|
|
|
|
|
|
|
|
key: EncryptedConfig::SMS_CONFIGS_KEY,
|
|
|
|
value: {
|
|
|
|
value: {
|
|
|
|
'enabled' => true,
|
|
|
|
'enabled' => true,
|
|
|
|
'provider' => 'signalwire',
|
|
|
|
'provider' => 'signalwire',
|
|
|
|
@ -132,9 +143,12 @@ RSpec.describe 'SMS Settings', type: :request do
|
|
|
|
post settings_sms_path, params: {
|
|
|
|
post settings_sms_path, params: {
|
|
|
|
encrypted_config: {
|
|
|
|
encrypted_config: {
|
|
|
|
value: {
|
|
|
|
value: {
|
|
|
|
enabled: '1', provider: 'signalwire',
|
|
|
|
enabled: '1',
|
|
|
|
signalwire_space_url: 'test.signalwire.com', signalwire_project_id: 'uuid-1234',
|
|
|
|
provider: 'signalwire',
|
|
|
|
signalwire_api_token: '', signalwire_from: '+15551234567'
|
|
|
|
signalwire_space_url: 'test.signalwire.com',
|
|
|
|
|
|
|
|
signalwire_project_id: 'uuid-1234',
|
|
|
|
|
|
|
|
signalwire_api_token: '',
|
|
|
|
|
|
|
|
signalwire_from: '+15551234567'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|