Merge pull request #5705 from discourse/new_webhooks

FEATURE: Webhook for group and category events
This commit is contained in:
Vinoth Kannan
2018-04-02 10:53:21 +05:30
committed by GitHub
18 changed files with 214 additions and 13 deletions
+9
View File
@@ -450,6 +450,15 @@ describe GroupsController do
expect(group.flair_color).to eq('BBB')
expect(group.name).to eq('testing')
end
it 'triggers a extensibility event' do
event = DiscourseEvent.track_events {
put "/groups/#{group.id}.json", params: { group: { flair_color: 'BBB' } }
}.last
expect(event[:event_name]).to eq(:group_updated)
expect(event[:params].first).to eq(group)
end
end
context "when user is not a group owner or admin" do