Sha256: 45b30d7c371556170b351b41b85d393bf0ef4d272da95110d118c132df688e37
Contents?: true
Size: 806 Bytes
Versions: 6
Compression:
Stored size: 806 Bytes
Contents
require File.join(File.dirname(__FILE__), "test_helper") class TestPxtVodafoneNetNz < Test::Unit::TestCase include MMS2R::TestHelper def setup mail = mail('pxt-image-01.mail') @mms = MMS2R::Media.new(mail) assert_equal '+55512345', @mms.number assert_equal 'pxt.vodafone.net.nz', @mms.carrier 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
6 entries across 6 versions & 1 rubygems