fix build
This commit is contained in:
parent
5551ef9418
commit
1725bf77a7
spec/models
|
@ -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) }
|
let(:bookmark) { PostAction.new(user_id: post.user_id, post_action_type_id: PostActionType.types[:bookmark] , post_id: post.id) }
|
||||||
|
|
||||||
describe "messaging" do
|
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.stubs(:create)
|
||||||
PostAction.expects(:target_moderators).returns("bob")
|
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");
|
PostAction.act(build(:user), build(:post), PostActionType.types[:notify_moderators], "this is my special message");
|
||||||
end
|
end
|
||||||
|
|
||||||
it "sends an email to user if selected" do
|
it "sends an email to user if selected" do
|
||||||
PostAction.stubs(:create)
|
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 = build(:post)
|
||||||
post.user = build(:user)
|
post.user = build(:user)
|
||||||
PostAction.act(build(:user), post, PostActionType.types[:notify_user], "this is my special message");
|
PostAction.act(build(:user), post, PostActionType.types[:notify_user], "this is my special message");
|
||||||
|
|
Loading…
Reference in New Issue