Sha256: 619deb6d27c9d74e28511199062241d65ebf18742734f863de56dd8aaf51f12b

Contents?: true

Size: 911 Bytes

Versions: 16

Compression:

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

  def setup
    mail = TMail::Mail.parse(load_mail('pxt-image-01.mail').join)
    @mms = MMS2R::Media.new(mail)
  end
  
  def teardown
    @mms.purge
  end

  def test_pxt_text_returns_text_plain
    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(/Kia ora ano Luke/, text)
    
    assert_match(/Kia ora ano Luke/, @mms.body)
  end
  
  def test_subject_should_clear_default_pxt_message
    assert_equal "", @mms.subject
  end

end

Version data entries

16 entries across 16 versions & 2 rubygems

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