feat: CSAT for all channels (#2749)

This commit is contained in:
Muhsin Keloth
2021-08-23 22:00:47 +05:30
committed by GitHub
parent 5debe9e8ee
commit 6515b69560
23 changed files with 382 additions and 68 deletions

View File

@@ -114,9 +114,10 @@ describe ::MessageTemplates::HookExecutionService do
expect(csat_survey).not_to have_received(:perform)
end
it 'will not call ::MessageTemplates::Template::CsatSurvey if its not a website widget' do
api_channel = create(:channel_api)
conversation = create(:conversation, inbox: create(:inbox, channel: api_channel))
it 'will not call ::MessageTemplates::Template::CsatSurvey if its a tweet conversation' do
twitter_channel = create(:channel_twitter_profile)
twitter_inbox = create(:inbox, channel: twitter_channel)
conversation = create(:conversation, inbox: twitter_inbox, additional_attributes: { type: 'tweet' })
conversation.inbox.update(csat_survey_enabled: true)
conversation.resolved!