Sampriti-Mitra / dialogflow-slack-sdk

SDK to use Dialogflow CX on Slack-Set up an integration deployment to link your Dialogflow agent to slack
Apache License 2.0
8 stars 5 forks source link

Add unit tests for slack handler #39

Closed Sampriti-Mitra closed 3 years ago

Sampriti-Mitra commented 3 years ago

Add unit tests for NewSlackRequest, VerifyIncomingSlackRequests by mocking a slack request, Refer https://github.com/Sampriti-Mitra/dialogflow-slack-sdk/blob/main/functions/externals/slack-handler.go

For slack events API response, please see https://api.slack.com/events/app_mention#app_mention-event__example-event-payloads__standard-app-mention-when-your-app-is-already-in-channel

For VerifyIncomingSlackRequests, you need to pass the signing secret in headers, check https://api.slack.com/authentication/verifying-requests-from-slack#about