Sha256: 080a3e5495694ef891452513dc4d792cf4e90c8cde8d663fb3d7bb6bc5fb6cfa

Contents?: true

Size: 1.54 KB

Versions: 6

Compression:

Stored size: 1.54 KB

Contents

# Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
# This is free software with ABSOLUTELY NO WARRANTY.
# You can redistribute it and/or modify it under the terms of the GNU GPL 2.

$LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
require 'qwik/test-module-ml'

class TestSubmitHtmlMail < Test::Unit::TestCase
  include TestModuleML

  def test_all
    qml = QuickML::Group.new(@ml_config, 'test@example.com')
    qml.setup_test_config
    mail = post_mail(qml) {
"Date: Mon, 1 Aug 2005 11:06:12 +0900
To: test@example.com
From: bob@example.net
Subject: HtmlMail
Content-Type: multipart/alternative;
 boundary=\"============_-1089260510==_ma============\"

--============_-1089260510==_ma============
Content-Type: text/plain; charset='iso-2022-jp'
Content-Transfer-Encoding: 7bit

です。
--============_-1089260510==_ma============
Content-Type: text/html; charset='iso-2022-jp'
Content-Transfer-Encoding: 7bit

<!doctype html public \"-//W3C//DTD W3 HTML//EN\">
<html><head><style type=\"text/css\"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>George Legady</title></head><body>
<div>です。<br>
</div>
</body>
</html>
--============_-1089260510==_ma============--
" }

    ok_eq("============_-1089260510==_ma============", mail.boundary)

    mail1 = QuickML::Mail.new
    mail1.read(mail.parts[1])
    ok_eq('text/html', mail1.content_type)

    page = @site['HtmlMail']
    ok_eq('HtmlMail', page.get_title)
    ok_eq("* HtmlMail\n{{mail(bob@example.net,0)\nです。\n}}\n", page.load)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
qwik2md-2.0.1 vendor/qwik/lib/qwik/test-submit-html-mail.rb
qwik2md-2.0.0 vendor/qwik/lib/qwik/test-submit-html-mail.rb
qwik2md-1.0.2 vendor/qwik/lib/qwik/test-submit-html-mail.rb
qwik2md-1.0.1 vendor/qwik/lib/qwik/test-submit-html-mail.rb
qwik2md-1.0.0 vendor/qwik/lib/qwik/test-submit-html-mail.rb
qwik2md-0.1.0 vendor/qwik/lib/qwik/test-submit-html-mail.rb