Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added support for cincinnati bell (http://www.cincinnatibell.com/)

with supporting tests.
  • Loading branch information...
commit ba507f5f3d4bd1d94a235b49a808dcc9cd0bf3ea 1 parent 64e4c32
@jpmcgrath jpmcgrath authored
View
1  .gitignore
@@ -5,3 +5,4 @@ email.txt
coverage.info
mkmf.log
doc/
+.redcar/
View
5 conf/mms.gocbw.com.yml
@@ -0,0 +1,5 @@
+---
+transform:
+ text/plain:
+ - - !ruby/regexp /^This is an MMS message. Please go to .* to reply to the message.\n\n/i
+ - "\\1"
View
2,408 test/fixtures/cincinnati-bell-image-01.mail
2,408 additions, 0 deletions not shown
View
24 test/test_mms_cincinnati_bell.rb
@@ -0,0 +1,24 @@
+require "test_helper"
+
+class TestMmsCincinnatiBell < Test::Unit::TestCase
+ include MMS2R::TestHelper
+
+ def test_mms_image_cincinnati_bell
+ # sms.sasktel.com service
+ mail = mail('cincinnati-bell-image-01.mail')
+ mms = MMS2R::Media.new(mail)
+ assert_equal "12223334444", mms.number
+ assert_equal "mms.gocbw.com", mms.carrier
+ assert_equal "", mms.subject
+ assert_nil mms.media['text/html']
+ assert_nil mms.media['image/gif']
+ # we have media and text, to 2 media items
+ assert_equal 2, mms.media.size
+ assert_not_nil mms.media['image/jpeg']
+ assert_equal 1, mms.media['image/jpeg'].size
+ assert_match(/test-file.jpg$/, mms.media['image/jpeg'].first)
+ assert_file_size(mms.media['image/jpeg'].first, 106024)
+ mms.purge
+ end
+
+end
Please sign in to comment.
Something went wrong with that request. Please try again.