fix build

This commit is contained in:
Sam 2013-04-12 21:09:41 +10:00
parent 5551ef9418
commit 1725bf77a7
1 changed files with 5 additions and 6 deletions

View File

@ -14,17 +14,16 @@ describe PostAction do
let(:bookmark) { PostAction.new(user_id: post.user_id, post_action_type_id: PostActionType.types[:bookmark] , post_id: post.id) }
describe "messaging" do
it "sends an email to all moderators if selected" do
it "sends an email to all moderators if selected" do
PostAction.stubs(:create)
PostAction.expects(:target_moderators).returns("bob")
PostCreator.any_instance.expects(:create).returns(nil)
PostCreator.any_instance.expects(:create).returns(nil)
PostAction.act(build(:user), build(:post), PostActionType.types[:notify_moderators], "this is my special message");
end
it "sends an email to user if selected" do
it "sends an email to user if selected" do
PostAction.stubs(:create)
PostAction.expects(:target_moderators).returns("bob")
PostCreator.any_instance.expects(:create).returns(nil)
PostCreator.any_instance.expects(:create).returns(nil)
post = build(:post)
post.user = build(:user)
PostAction.act(build(:user), post, PostActionType.types[:notify_user], "this is my special message");