Sha256: a1f0d0bfb792a2293ab5a91167f145d0fcc492043dad91adbdedbb8f29b0d6a3
Contents?: true
Size: 729 Bytes
Versions: 1
Compression:
Stored size: 729 Bytes
Contents
require 'spec_helper' module Commontator describe CommentObserver do before do setup_model_spec @comment_observer = CommentObserver.send :new @thread.subscribe(@user) @comment = Comment.new @comment.thread = @thread @comment.creator = @user @comment.body = 'Something' @comment.save! end it 'wont send mail unless recipients not empty' do @comment_observer.after_create(@comment).must_be_nil end it 'must send mail if recipients not empty' do @user2 = DummyUser.create @thread.subscribe(@user2) pp @thread.active_subscribers @comment_observer.after_create(@comment).must_be_instance_of Mail::Message end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
commontator-1.1.0 | spec/app/models/commontator/comment_observer_spec.rb~ |