mirror of
https://github.com/discourse/discourse.git
synced 2026-08-09 12:38:21 -05:00
Merge pull request #4536 from fantasticfears/webhooks-edit
FIX: missing post and topic edited webhooks
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user