Sha256: 924afd4ac3f3fbf60ccdf93ec57ad24b75284e2a270af105eca0c1dc96c589f6

Contents?: true

Size: 827 Bytes

Versions: 18

Compression:

Stored size: 827 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'
require 'raker_mailer'

class RakerMailerTest < ActiveSupport::TestCase

  context "deliver emails" do

    def setup
      ActionMailer::Base.delivery_method = :test
      ActionMailer::Base.perform_deliveries = true
      ActionMailer::Base.deliveries = []
      @expected = TMail::Mail.new
      @expected.set_content_type "text", "plain", { "charset" => 'utf-8' }
    end

    should "send notification feed added email" do
      feed = Factory(:feed)
      response = RakerMailer.deliver_notification_feed_added(feed)
      assert !ActionMailer::Base.deliveries.empty?, "No email was sent"
      email = ActionMailer::Base.deliveries.last
      assert_equal email.to, [GlobalConfig.admin_email]
      assert_equal email.from, [GlobalConfig.from_email]
    end

  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
muck-raker-0.1.32 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.33 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.31 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.30 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.29 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.28 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.27 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.22 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.23 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.24 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.25 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.26 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.16 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.17 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.18 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.19 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.20 test/rails_root/test/unit/raker_mailer_test.rb
muck-raker-0.1.21 test/rails_root/test/unit/raker_mailer_test.rb