Sha256: b454c00a40c1abc82ea96c098b34f8fc16fac4efb876f26f351fe7868780ac5a

Contents?: true

Size: 727 Bytes

Versions: 9

Compression:

Stored size: 727 Bytes

Contents

require File.join(File.dirname(__FILE__), "..", "lib", "mms2r")
require File.join(File.dirname(__FILE__), "test_helper")
require 'test/unit'
require 'rubygems'
require 'mocha'
gem 'tmail', '>= 1.2.1'
require 'tmail'

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

  def test_subject_number_image
    mail = TMail::Mail.parse(load_mail('telus-image-01.mail').join)
    mms = MMS2R::Media.new(mail)

    assert_equal "", mms.subject
    assert_equal "2068675309", mms.number

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

    image = mms.media['image/jpeg'].detect{|f| /Lil%20bud%202.jpg/ =~ f}
    assert_equal 337, File.size(image) 

    mms.purge
  end
  
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
brendanlim-mms2r-2.2.0.1 test/test_msg_telus_com.rb
brendanlim-mms2r-2.2.0 test/test_msg_telus_com.rb
mms2r-2.4.1 test/test_msg_telus_com.rb
mms2r-2.4.0 test/test_msg_telus_com.rb
mms2r-2.3.0 test/test_msg_telus_com.rb
mms2r-2.1.1 test/test_msg_telus_com.rb
mms2r-2.2.0 test/test_msg_telus_com.rb
mms2r-2.1.3 test/test_msg_telus_com.rb
mms2r-2.1.2 test/test_msg_telus_com.rb