Sha256: 6e94968b9e00e4d166eda68627a0a82e7e5e642b9b1a49fd7384ae0e927ba7ad
Contents?: true
Size: 863 Bytes
Versions: 8
Compression:
Stored size: 863 Bytes
Contents
require 'test_helper' module Commontator describe SubscriptionsMailer do before do setup_mailer_spec @user2 = DummyUser.create @thread.subscribe(@user) @thread.subscribe(@user2) @comment = Comment.new @comment.thread = @thread @comment.creator = @user @comment.body = 'Something' @comment.save! @recipients = @thread.active_subscribers.reject{|s| s == @user} end it 'must create deliverable mail' do mail = SubscriptionsMailer.comment_created(@comment, @recipients) mail.must_be_instance_of Mail::Message mail.to.must_equal 'Undisclosed Recipients' mail.cc.must_be_nil mail.bcc.size.must_equal 1 mail.bcc.must_include @user2.email mail.subject.wont_be_empty mail.body.wont_be_empty mail.deliver.must_equal mail end end end
Version data entries
8 entries across 8 versions & 1 rubygems