Sha256: 6aa641b05d42d80b11b34a82cf7160179593da1e2227dcda888e4bed7b6e82d3

Contents?: true

Size: 690 Bytes

Versions: 8

Compression:

Stored size: 690 Bytes

Contents

require 'test_helper'

class TemplateHandlerTest < ActionDispatch::IntegrationTest
  test ".md template handler" do
    get "/handlers/plain_markdown"
    expected = "<p>Hello</p>"
    assert_match expected, response.body
  end

  test "dual templates" do
    email = UserNoLayoutMailer.contact.deliver_now

    assert_equal 2, email.parts.size
    assert_equal "multipart/alternative", email.mime_type

    assert_equal "text/plain", email.text_part.mime_type
    assert_match "Dual templates **rock**!", email.text_part.body.to_s

    assert_equal "text/html", email.html_part.mime_type
    assert_match "<p>Dual templates <strong>rock</strong>!</p>", email.html_part.body.to_s
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
maildown-3.3.1 test/integration/template_handler_test.rb
maildown-3.3.0 test/integration/template_handler_test.rb
maildown-3.2.0 test/integration/template_handler_test.rb
maildown-3.1.0 test/integration/template_handler_test.rb
maildown-3.0.3 test/integration/template_handler_test.rb
maildown-3.0.2 test/integration/template_handler_test.rb
maildown-3.0.1 test/integration/template_handler_test.rb
maildown-3.0.0 test/integration/template_handler_test.rb