Sha256: b7bbde087edb10465db3a8e63153a825f68adafb6060ea6ba5ae264670f9610a

Contents?: true

Size: 736 Bytes

Versions: 16

Compression:

Stored size: 736 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 TestMessagingSprintpcsCom < Test::Unit::TestCase
  include MMS2R::TestHelper

  def test_simple_text
    mail = TMail::Mail.parse(load_mail('sprint-pcs-text-01.mail').join)
    mms = MMS2R::Media.new(mail)

    assert_equal 1, mms.media.size
    assert_not_nil mms.media['text/plain']
    file = mms.media['text/plain'][0]
    assert_not_nil file
    assert File::exist?(file), "file #{file} does not exist"
    text = IO.readlines("#{file}").join
    assert_match(/hello world/, text)
    mms.purge
  end
  
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
brendanlim-mms2r-2.2.0.1 test/test_messaging_sprintpcs_com.rb
brendanlim-mms2r-2.2.0 test/test_messaging_sprintpcs_com.rb
mms2r-2.4.1 test/test_messaging_sprintpcs_com.rb
mms2r-2.4.0 test/test_messaging_sprintpcs_com.rb
mms2r-2.3.0 test/test_messaging_sprintpcs_com.rb
mms2r-2.0.1 test/test_messaging_sprintpcs_com.rb
mms2r-2.0.0 test/test_messaging_sprintpcs_com.rb
mms2r-2.0.2 test/test_messaging_sprintpcs_com.rb
mms2r-2.0.5 test/test_messaging_sprintpcs_com.rb
mms2r-2.0.3 test/test_messaging_sprintpcs_com.rb
mms2r-2.0.4 test/test_messaging_sprintpcs_com.rb
mms2r-2.1.0 test/test_messaging_sprintpcs_com.rb
mms2r-2.1.1 test/test_messaging_sprintpcs_com.rb
mms2r-2.2.0 test/test_messaging_sprintpcs_com.rb
mms2r-2.1.3 test/test_messaging_sprintpcs_com.rb
mms2r-2.1.2 test/test_messaging_sprintpcs_com.rb