Sha256: 88d6c0325a9d58110352fb239bb2a761047e70724e8382ec5bc0e37691032655

Contents?: true

Size: 584 Bytes

Versions: 28

Compression:

Stored size: 584 Bytes

Contents

require 'test_helper'

module Workarea
  module Storefront
    class TransactionalMailerTest < MailerTest
      def test_enabled_transactional_emails
        Workarea.config.send_transactional_emails = true

        order = create_placed_order
        OrderMailer.confirmation(order.id).deliver_now

        assert_emails(1)
      end

      def test_disabling_transactionl_email
        Workarea.config.send_transactional_emails = false

        order = create_placed_order
        OrderMailer.confirmation(order.id).deliver_now

        assert_no_emails
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
workarea-storefront-3.5.27 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.26 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.25 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.23 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.22 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.21 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.20 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.19 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.18 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.17 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.16 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.15 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.14 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.13 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.12 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.11 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.10 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.9 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.8 test/mailers/workarea/storefront/transactional_mailer_test.rb
workarea-storefront-3.5.7 test/mailers/workarea/storefront/transactional_mailer_test.rb