Sha256: 2194c2136990a05e855f003ab0c75fe57fecbd3366c68164880396bc60fe33b4
Contents?: true
Size: 839 Bytes
Versions: 6
Compression:
Stored size: 839 Bytes
Contents
require 'spec_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_be_nil 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
6 entries across 6 versions & 1 rubygems