Sha256: 4a080d72c1a78cb6256c69c6c876b8ba6b17e7217dec7d427444e14943d1eced

Contents?: true

Size: 1.62 KB

Versions: 21

Compression:

Stored size: 1.62 KB

Contents

class EmailsController < ApplicationController

  def do_nothing
    render_nothing
  end

  def send_email
    deliver :email
    render_nothing
  end

  def send_crlf_email
    deliver :email_crlf
    render_nothing
  end

  def send_email_with_umlauts
    deliver :email_with_umlauts
    render_nothing
  end

  def send_html_email_with_links
    deliver :html_email_with_links
    render_nothing
  end

  def send_text_email_with_links
    deliver :text_email_with_links
    render_nothing
  end

  def send_html_email_with_linebreaks
    deliver :html_email_with_linebreaks
    render_nothing
  end

  def send_html_email_with_specific_line
    deliver :html_email_with_specific_line
    render_nothing
  end

  def send_text_email_with_specific_line
    deliver :text_email_with_specific_line
    render_nothing
  end

  def send_html_email_for_successful_test_without_header
    deliver :html_email_for_successful_test_without_header
    render_nothing
  end

  def send_text_email_for_successful_test_without_header
    deliver :text_email_for_successful_test_without_header
    render_nothing
  end

  def send_html_email_for_failed_test_without_header
    deliver :html_email_for_failed_test_without_header
    render_nothing
  end

  def send_text_email_for_failed_test_without_header
    deliver :text_email_for_failed_test_without_header
    render_nothing
  end

  private

  def deliver(method_name)
    case
    when Rails.version.to_i >= 5
      SpreewaldMailer.send(method_name).deliver
    when Rails.version.to_i >= 3
      Mailer.public_send(method_name).deliver
    else
      Mailer.public_send("deliver_#{method_name}")
    end
  end

end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
spreewald-4.6.2 tests/shared/app/controllers/emails_controller.rb
spreewald-4.6.1 tests/shared/app/controllers/emails_controller.rb
spreewald-4.6.0 tests/shared/app/controllers/emails_controller.rb
spreewald-4.5.1 tests/shared/app/controllers/emails_controller.rb
spreewald-4.5.0 tests/shared/app/controllers/emails_controller.rb
spreewald-4.4.4 tests/shared/app/controllers/emails_controller.rb
spreewald-4.4.3 tests/shared/app/controllers/emails_controller.rb
spreewald-4.4.2 tests/shared/app/controllers/emails_controller.rb
spreewald-4.4.1 tests/shared/app/controllers/emails_controller.rb
spreewald-4.4.0 tests/shared/app/controllers/emails_controller.rb
spreewald-4.3.6 tests/shared/app/controllers/emails_controller.rb
spreewald-4.3.5 tests/shared/app/controllers/emails_controller.rb
spreewald-4.3.4 tests/shared/app/controllers/emails_controller.rb
spreewald-4.3.3 tests/shared/app/controllers/emails_controller.rb
spreewald-4.3.2 tests/shared/app/controllers/emails_controller.rb
spreewald-4.2.3 tests/shared/app/controllers/emails_controller.rb
spreewald-4.2.2 tests/shared/app/controllers/emails_controller.rb
spreewald-4.1.2 tests/shared/app/controllers/emails_controller.rb
spreewald-4.1.1 tests/shared/app/controllers/emails_controller.rb
spreewald-4.1.0 tests/shared/app/controllers/emails_controller.rb