Files
gochat/backend/internal/automation/coverage8_test.go
T

105 lines
2.7 KiB
Go

package automation
import (
"context"
"testing"
"github.com/stretchr/testify/assert"
)
func TestCsatSurveyService_New_Cov8(t *testing.T) {
svc := NewCsatSurveyService(nil)
assert.NotNil(t, svc)
}
func TestCsatSurveyService_Ready_Nil_Cov8(t *testing.T) {
svc := &CsatSurveyService{}
assert.False(t, svc.Ready())
}
func TestCsatSurveyService_DB_Nil_Cov8(t *testing.T) {
svc := &CsatSurveyService{}
defer func() { _ = recover() }()
_ = svc.DB()
}
func TestCsatSurveyService_SetSearchIndexer_Cov8(t *testing.T) {
svc := &CsatSurveyService{}
svc.SetSearchIndexer(nil)
}
func TestCsatSurveyService_GetByID_Nil_Cov8(t *testing.T) {
svc := &CsatSurveyService{}
defer func() { _ = recover() }()
_, _ = svc.GetByID(context.Background(), 1)
}
func TestCsatSurveyService_GetByIDForAccount_Nil_Cov8(t *testing.T) {
svc := &CsatSurveyService{}
defer func() { _ = recover() }()
_, _ = svc.GetByIDForAccount(context.Background(), 1, 1)
}
func TestCsatSurveyService_GetByConversationUUID_Nil_Cov8(t *testing.T) {
svc := &CsatSurveyService{}
defer func() { _ = recover() }()
_, _ = svc.GetByConversationUUID(context.Background(), "test-uuid")
}
func TestCsatSurveyService_ListByAccount_Nil_Cov8(t *testing.T) {
svc := &CsatSurveyService{}
defer func() { _ = recover() }()
_, _, _ = svc.ListByAccount(context.Background(), 1, CsatListFilter{})
}
func TestCsatSurveyService_Create_Nil_Cov8(t *testing.T) {
svc := &CsatSurveyService{}
defer func() { _ = recover() }()
_ = svc.Create(context.Background(), nil)
}
func TestCsatSurveyService_Update_Nil_Cov8(t *testing.T) {
svc := &CsatSurveyService{}
defer func() { _ = recover() }()
_ = svc.UpdateResponse(context.Background(), 1, 5, "good")
}
func TestCsatSurveyService_Delete_Nil_Cov8(t *testing.T) {
svc := &CsatSurveyService{}
defer func() { _ = recover() }()
_ = svc.UpdateReviewNotes(context.Background(), 1, "notes", 1)
}
func TestCsatSurveyService_GetMetrics_Nil_Cov8(t *testing.T) {
svc := &CsatSurveyService{}
defer func() { _ = recover() }()
_ = svc
}
func TestAutomationRuleListener_New_Cov8(t *testing.T) {
l := NewAutomationRuleListener(nil)
assert.NotNil(t, l)
}
func TestAutomationRuleListener_NewWithWorker_Cov8(t *testing.T) {
defer func() { _ = recover() }()
l := NewAutomationRuleListenerWithWorker(nil, nil)
_ = l
}
func TestRegisterAutomationRuleListenerWithWorker_Cov8(t *testing.T) {
defer func() { _ = recover() }()
RegisterAutomationRuleListenerWithWorker(nil, nil, nil)
}
func TestAutomationRuleListener_OnEvent_Nil_Cov8(t *testing.T) {
l := &AutomationRuleListener{}
defer func() { _ = recover() }()
_ = l.OnEvent(context.Background(), nil)
}
func TestAutomationRuleListener_Name_Cov8(t *testing.T) {
l := &AutomationRuleListener{}
assert.NotEmpty(t, l.Name())
}