Sha256: db3c3e8f0a1bfb9d9155dae595e39854e05354a640dbc4349a4c18d8bb6933fc

Contents?: true

Size: 568 Bytes

Versions: 5

Compression:

Stored size: 568 Bytes

Contents

# frozen_string_literal: true

require "test_helper"

class MailerTest < ActionMailer::TestCase
  test "pass given block to #mail call" do
    class TestMailer < Devise::Mailer
      def confirmation_instructions(record, token, opts = {})
        @token = token
        devise_mail(record, :confirmation_instructions, opts) do |format|
          format.html(content_transfer_encoding: "7bit")
        end
      end
    end

    mail = TestMailer.confirmation_instructions(create_user, "confirmation-token")

    assert mail.content_transfer_encoding, "7bit"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
devise-4.5.0 test/mailers/mailer_test.rb
devise-4.4.3 test/mailers/mailer_test.rb
devise-4.4.2 test/mailers/mailer_test.rb
devise-4.4.1 test/mailers/mailer_test.rb
devise-4.4.0 test/mailers/mailer_test.rb