Sha256: 96f7cce6e76ca3693780bdd61ed17f8ccd81c9ae2c914334407a9a36ce6d78d2
Contents?: true
Size: 852 Bytes
Versions: 4
Compression:
Stored size: 852 Bytes
Contents
require 'test/unit' require 'damagecontrol/publisher/base' require 'damagecontrol/publisher/fixture' module DamageControl module Publisher class EmailTest < Test::Unit::TestCase include Fixture def test_should_send_email_on_publish BuildMailer.template_root = File.expand_path(File.dirname(__FILE__) + "/../../../app/views") publisher = Email.new tmail = BuildMailer.create_email(mock_build(true), publisher) body = tmail.body_port.ropen.read assert(body.index("Successful build (by aslak)")) assert(body.index("path/seven")) to = ENV["DC_EMAIL_TEST"] if(to) publisher.to = to puts "Sending mail to #{to} (for real)" BuildMailer.deliver_email(mock_build(true), publisher) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems