FEATURE: Webhook for user creation and approval

This commit is contained in:
Erick Guan
2016-09-13 16:03:17 +08:00
committed by Guo Xiang Tan
parent fd9056973a
commit c463cf63d4
9 changed files with 57 additions and 10 deletions

View File

@ -102,7 +102,7 @@ describe UserBadgesController do
it 'will trigger :user_badge_granted' do
log_in :admin
user
DiscourseEvent.expects(:trigger).with(:user_badge_granted, anything, anything).once
xhr :post, :create, badge_id: badge.id, username: user.username
end
@ -126,6 +126,7 @@ describe UserBadgesController do
it 'will trigger :user_badge_removed' do
log_in :admin
DiscourseEvent.expects(:trigger).with(:user_badge_removed, anything, anything).once
xhr :delete, :destroy, id: user_badge.id
end