FIX: missing post and topic edited webhooks

This commit is contained in:
Erick Guan
2016-11-30 20:49:45 +01:00
parent 9afa55a3fd
commit 8c8549b27b
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