Merge pull request #4536 from fantasticfears/webhooks-edit

FIX: missing post and topic edited webhooks
This commit is contained in:
Guo Xiang Tan
2016-12-02 10:16:19 +01:00
committed by GitHub
3 changed files with 16 additions and 13 deletions
+4 -4
View File
@@ -120,14 +120,14 @@ describe WebHook do
end
it 'should enqueue the right hooks for post events' do
user # bypass a user_created event
WebHook.expects(:enqueue_hooks).once
WebHook.expects(:enqueue_post_hooks).once
PostCreator.create(user, { raw: 'post', topic_id: topic.id, reply_to_post_number: 1, skip_validations: true })
WebHook.expects(:enqueue_hooks).once
# post destroy or recover triggers a moderator post
WebHook.expects(:enqueue_post_hooks).twice
PostDestroyer.new(user, post2).destroy
WebHook.expects(:enqueue_hooks).once
WebHook.expects(:enqueue_post_hooks).twice
PostDestroyer.new(user, post2).recover
end