Sha256: 0862ebb6d3487414b9490f25e595d0827f85aee1d23367ebc21048469fce499d

Contents?: true

Size: 671 Bytes

Versions: 6

Compression:

Stored size: 671 Bytes

Contents

require File.join(File.dirname(__FILE__), "test_helper")

class TestRciRogersCom < Test::Unit::TestCase
  include MMS2R::TestHelper

  def test_image_and_text_and_number
    mail = mail('rogers-canada-mms-01.mail')
    mms = MMS2R::Media.new(mail)

    assert_equal "1234567890", mms.number
    assert_equal 'rci.rogers.com', mms.carrier
    assert_equal "", mms.subject

    assert_equal 1, mms.media.size
    assert_equal 2, mms.media['image/jpeg'].size

    #janky test because there is a verisign logo in the file
    assert_not_nil mms.media['image/jpeg'].first
    assert mms.media['image/jpeg'].detect{|f| /A2.2658324049556002.jpg$/ =~ f}
    mms.purge
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mms2r-3.3.1 test/test_rci_rogers_com.rb
mms2r-3.3.0 test/test_rci_rogers_com.rb
mms2r-3.2.0 test/test_rci_rogers_com.rb
mms2r-3.1.0 test/test_rci_rogers_com.rb
mms2r-3.0.1 test/test_rci_rogers_com.rb
mms2r-3.0.0 test/test_rci_rogers_com.rb