Sha256: ac37b77e10333b7517b38a3a30d5a44238b84c90058e65d41186a3ba753182bb

Contents?: true

Size: 689 Bytes

Versions: 3

Compression:

Stored size: 689 Bytes

Contents

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

class UserMailerTest < ActionMailer::TestCase
  CHARSET = "utf-8"

  include ActionMailer::Quoting

  def setup
    @user = User.make
    @article = Article.make
  end

  def test_newsupdate
    newsupdate = UserMailer.create_newsupdate(@user, @article)
    assert_equal 'fificium@gmail.com', newsupdate.from.first
    assert_equal I18n.t(:usermailer_newsupdate_subject), newsupdate.subject
    assert_equal @user.email, newsupdate.to.first
    assert_match /#{@article.body}/, newsupdate.body
    assert_match /#{@article.summary}/, newsupdate.body
    assert_match /#{@article.title}/, newsupdate.body
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
solarsearch-0.0.10 test/unit/user_mailer_test.rb
solarsearch-0.0.9 test/unit/user_mailer_test.rb
solarsearch-0.0.6 test/unit/user_mailer_test.rb