M lib/customer_ogm.rb => lib/customer_ogm.rb +1 -1
@@ 56,7 56,7 @@ module CustomerOGM
end
def formatted_tel
- @tel.sub(/\A\+?1?(\d{3})(\d{3})/, "(\\1) \\2-")
+ @tel.sub(/\A\+?1(\d{3})(\d{3})(\d+)/, "\\1.\\2.\\3").gsub(/(?=\d)/, " ")
end
def to_render
M test/test_customer_ogm.rb => test/test_customer_ogm.rb +1 -1
@@ 26,7 26,7 @@ class CustomerOGMTest < Minitest::Test
</vcard4>
XML
assert_equal(
- [:voicemail_ogm_tts, { locals: { fn: "(555) 123-4567" } }],
+ [:voicemail_ogm_tts, { locals: { fn: " 5 5 5. 1 2 3. 4 5 6 7" } }],
CustomerOGM::TTS.new("+15551234567", vcard).to_render
)
end