Skip to content

Instantly share code, notes, and snippets.

@penso
Created July 27, 2009 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save penso/156655 to your computer and use it in GitHub Desktop.
Save penso/156655 to your computer and use it in GitHub Desktop.
require 'test_helper'
#require 'tmail'
class UserTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
test "Receving email for users" do
mail = TMail::Mail.new
mail.to = users(:fabienpenso).recipient_email_address + APP_CONFIG['email_domain']
mail.from = 'Fabien Penso <fabienpenso@nonexisting.com>'
mail.subject = 'test mail for seeing'
mail.date = Time.now
mail.mime_version = '1.0'
mail.set_content_type 'text', 'plain', {'charset'=>'utf-8'}
mail.body = 'This is test mail. Just to try it out'
UserMailer.receive(mail)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment