Sha256: 1ca76549b24d8c92a6d51c3bcdfa6a9fa583027e017269d42bf7578945b92148

Contents?: true

Size: 499 Bytes

Versions: 3

Compression:

Stored size: 499 Bytes

Contents

require './test/test_base.rb'

class MIMEBuilderTextTest < Test::Unit::TestCase
  def test_contenttype
  	test_text = 'Hello world!'

    filepart = MIMEBuilder::Text.new(test_text)

    assert_equal 'text/plain', filepart.mime.headers.get('Content-Type')

    assert_equal test_text, filepart.mime.body.to_s
  end

  def test_content_id_disable
    filepart = MIMEBuilder::Text.new 'Hello world!', :content_id_disable => true

    assert_equal nil, filepart.mime.headers.get('Content-Id')
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mime_builder-0.0.4 test/test_text.rb
mime_builder-0.0.3 test/test_text.rb
mime_builder-0.0.2 test/test_text.rb