chore: Centralize outgoing message reply restrictions for all the channels (#11279)
This commit is contained in:
@@ -3,28 +3,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Channel::TwilioSms do
|
||||
describe '#has_24_hour_messaging_window?' do
|
||||
context 'with medium whatsapp' do
|
||||
let!(:whatsapp_channel) { create(:channel_twilio_sms, medium: :whatsapp) }
|
||||
|
||||
it 'returns true' do
|
||||
expect(whatsapp_channel.messaging_window_enabled?).to be true
|
||||
expect(whatsapp_channel.name).to eq 'Whatsapp'
|
||||
expect(whatsapp_channel.medium).to eq 'whatsapp'
|
||||
end
|
||||
end
|
||||
|
||||
context 'with medium sms' do
|
||||
let!(:sms_channel) { create(:channel_twilio_sms, medium: :sms) }
|
||||
|
||||
it 'returns false' do
|
||||
expect(sms_channel.messaging_window_enabled?).to be false
|
||||
expect(sms_channel.name).to eq 'Twilio SMS'
|
||||
expect(sms_channel.medium).to eq 'sms'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#validations' do
|
||||
context 'with phone number blank' do
|
||||
let!(:sms_channel) { create(:channel_twilio_sms, medium: :sms, phone_number: nil) }
|
||||
|
||||
Reference in New Issue
Block a user