Files
gochat/backend/internal/handler/api/v1/coverage10_test.go
T

3480 lines
127 KiB
Go

package v1
import (
"context"
"net/http/httptest"
"strings"
"testing"
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/assert"
)
func init() {
gin.SetMode(gin.TestMode)
}
func safeCall_Cov10(t *testing.T, f func()) {
defer func() { _ = recover() }()
f()
}
func newCtx_Cov10(method, path string) (*gin.Context, *httptest.ResponseRecorder) {
w := httptest.NewRecorder()
c, _ := gin.CreateTestContext(w)
c.Request = httptest.NewRequest(method, path, nil)
c.Request = c.Request.WithContext(context.Background())
return c, w
}
func newCtxBody_Cov10(method, path string, body string) (*gin.Context, *httptest.ResponseRecorder) {
w := httptest.NewRecorder()
c, _ := gin.CreateTestContext(w)
c.Request = httptest.NewRequest(method, path, strings.NewReader(body))
if body != "" {
c.Request.Header.Set("Content-Type", "application/json")
}
c.Request = c.Request.WithContext(context.Background())
return c, w
}
func newCtxParams_Cov10(method, path string, params map[string]string) (*gin.Context, *httptest.ResponseRecorder) {
c, w := newCtx_Cov10(method, path)
for k, v := range params {
c.Params = append(c.Params, gin.Param{Key: k, Value: v})
}
return c, w
}
func newCtxParamsBody_Cov10(method, path string, params map[string]string, body string) (*gin.Context, *httptest.ResponseRecorder) {
c, w := newCtxBody_Cov10(method, path, body)
for k, v := range params {
c.Params = append(c.Params, gin.Param{Key: k, Value: v})
}
return c, w
}
// =================================================================
// Constructor tests — verify all handlers can be created with nil
// =================================================================
func TestNewAccountHandler_Nil_Cov10(t *testing.T) {
h := NewAccountHandler(nil)
assert.NotNil(t, h)
}
func TestNewAgentBotHandler_Nil_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
assert.NotNil(t, h)
}
func TestNewAgentBotInboxHandler_Nil_Cov10(t *testing.T) {
h := NewAgentBotInboxHandler(nil)
assert.NotNil(t, h)
}
func TestNewAgentBulkHandler_Nil_Cov10(t *testing.T) {
h := NewAgentBulkHandler(nil)
assert.NotNil(t, h)
}
func TestNewAgentCapacityHandler_Nil_Cov10(t *testing.T) {
h := NewAgentCapacityHandler(nil)
assert.NotNil(t, h)
}
func TestNewAgentHandler_Nil_Cov10(t *testing.T) {
h := NewAgentHandler(nil)
assert.NotNil(t, h)
}
func TestNewAnalyticsHandler_Nil_Cov10(t *testing.T) {
h := NewAnalyticsHandler(nil)
assert.NotNil(t, h)
}
func TestNewArticleHandler_Nil_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
assert.NotNil(t, h)
}
func TestNewAssignableAgentHandler_Nil_Cov10(t *testing.T) {
h := NewAssignableAgentHandler(nil)
assert.NotNil(t, h)
}
func TestNewAssignmentPolicyHandler_Nil_Cov10(t *testing.T) {
h := NewAssignmentPolicyHandler(nil)
assert.NotNil(t, h)
}
func TestNewAssignmentPolicyV2Handler_Nil_Cov10(t *testing.T) {
h := NewAssignmentPolicyV2Handler(nil)
assert.NotNil(t, h)
}
func TestNewAuditHandler_Nil_Cov10(t *testing.T) {
h := NewAuditHandler(nil)
assert.NotNil(t, h)
}
func TestNewAuthHandler_Nil_Cov10(t *testing.T) {
h := NewAuthHandler(nil)
assert.NotNil(t, h)
}
func TestNewAutomationRuleHandler_Nil_Cov10(t *testing.T) {
h := NewAutomationRuleHandler(nil)
assert.NotNil(t, h)
}
func TestNewAutoReplyRuleHandler_Nil_Cov10(t *testing.T) {
h := NewAutoReplyRuleHandler(nil)
assert.NotNil(t, h)
}
func TestNewBannerHandler_Nil_Cov10(t *testing.T) {
h := NewBannerHandler(nil)
assert.NotNil(t, h)
}
func TestNewBotRuleHandler_Nil_Cov10(t *testing.T) {
h := NewBotRuleHandler(nil)
assert.NotNil(t, h)
}
func TestNewBotTriggerConfigHandler_Nil_Cov10(t *testing.T) {
h := NewBotTriggerConfigHandler(nil)
assert.NotNil(t, h)
}
func TestNewBulkActionHandler_Nil_Cov10(t *testing.T) {
h := NewBulkActionHandler(nil, nil)
assert.NotNil(t, h)
}
func TestNewCampaignHandler_Nil_Cov10(t *testing.T) {
h := NewCampaignHandler(nil)
assert.NotNil(t, h)
}
func TestNewCannedResponseHandler_Nil_Cov10(t *testing.T) {
h := NewCannedResponseHandler(nil)
assert.NotNil(t, h)
}
func TestNewCaptainAssistantHandler_Nil_Cov10(t *testing.T) {
h := NewCaptainAssistantHandler(nil)
assert.NotNil(t, h)
}
func TestNewCaptainAssistantResponseHandler_Nil_Cov10(t *testing.T) {
h := NewCaptainAssistantResponseHandler(nil)
assert.NotNil(t, h)
}
func TestNewCaptainBulkActionHandler_Nil_Cov10(t *testing.T) {
h := NewCaptainBulkActionHandler(nil)
assert.NotNil(t, h)
}
func TestNewCaptainConversationHandler_Nil_Cov10(t *testing.T) {
h := NewCaptainConversationHandler(nil)
assert.NotNil(t, h)
}
func TestNewCaptainCustomToolHandler_Nil_Cov10(t *testing.T) {
h := NewCaptainCustomToolHandler(nil)
assert.NotNil(t, h)
}
func TestNewCaptainDocumentHandler_Nil_Cov10(t *testing.T) {
h := NewCaptainDocumentHandler(nil)
assert.NotNil(t, h)
}
func TestNewCaptainPreferenceHandler_Nil_Cov10(t *testing.T) {
h := NewCaptainPreferenceHandler(nil)
assert.NotNil(t, h)
}
func TestNewCaptainScenarioHandler_Nil_Cov10(t *testing.T) {
h := NewCaptainScenarioHandler(nil)
assert.NotNil(t, h)
}
func TestNewCaptainTaskExtendedHandler_Nil_Cov10(t *testing.T) {
h := NewCaptainTaskExtendedHandler(nil)
assert.NotNil(t, h)
}
func TestNewCaptainTaskHandler_Nil_Cov10(t *testing.T) {
h := NewCaptainTaskHandler(nil)
assert.NotNil(t, h)
}
func TestNewCategoryHandler_Nil_Cov10(t *testing.T) {
h := NewCategoryHandler(nil)
assert.NotNil(t, h)
}
func TestNewCompanyHandler_Nil_Cov10(t *testing.T) {
h := NewCompanyHandler(nil)
assert.NotNil(t, h)
}
func TestNewContactHandler_Nil_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
assert.NotNil(t, h)
}
func TestNewContactInboxHandler_Nil_Cov10(t *testing.T) {
h := NewContactInboxHandler(nil)
assert.NotNil(t, h)
}
func TestNewContactMergeHandler_Nil_Cov10(t *testing.T) {
h := NewContactMergeHandler(nil)
assert.NotNil(t, h)
}
func TestNewConversationHandler_Nil_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
assert.NotNil(t, h)
}
func TestNewConversationInsightHandler_Nil_Cov10(t *testing.T) {
h := NewConversationInsightHandler(nil)
assert.NotNil(t, h)
}
func TestNewConversationParticipantHandler_Nil_Cov10(t *testing.T) {
h := NewConversationParticipantHandler(nil)
assert.NotNil(t, h)
}
func TestNewCopilotConfigHandler_Nil_Cov10(t *testing.T) {
h := NewCopilotConfigHandler(nil, nil)
assert.NotNil(t, h)
}
func TestNewCopilotHandler_Nil_Cov10(t *testing.T) {
h := NewCopilotHandler(nil)
assert.NotNil(t, h)
}
func TestNewCsatMetricsHandler_Nil_Cov10(t *testing.T) {
h := NewCsatMetricsHandler(nil)
assert.NotNil(t, h)
}
func TestNewCsatSurveyHandler_Nil_Cov10(t *testing.T) {
h := NewCsatSurveyHandler(nil)
assert.NotNil(t, h)
}
func TestNewCustomAttributeDefinitionHandler_Nil_Cov10(t *testing.T) {
h := NewCustomAttributeDefinitionHandler(nil)
assert.NotNil(t, h)
}
func TestNewCustomAttributeValueHandler_Nil_Cov10(t *testing.T) {
h := NewCustomAttributeValueHandler(nil)
assert.NotNil(t, h)
}
func TestNewCustomFilterHandler_Nil_Cov10(t *testing.T) {
h := NewCustomFilterHandler(nil)
assert.NotNil(t, h)
}
func TestNewCustomRoleHandler_Nil_Cov10(t *testing.T) {
h := NewCustomRoleHandler(nil)
assert.NotNil(t, h)
}
func TestNewDashboardAppHandler_Nil_Cov10(t *testing.T) {
h := NewDashboardAppHandler(nil)
assert.NotNil(t, h)
}
func TestNewDeliveryStatusHandler_Nil_Cov10(t *testing.T) {
h := NewDeliveryStatusHandler(nil)
assert.NotNil(t, h)
}
func TestNewDraftMessageHandler_Nil_Cov10(t *testing.T) {
h := NewDraftMessageHandler(nil)
assert.NotNil(t, h)
}
func TestNewEmailChannelMigrationHandler_Nil_Cov10(t *testing.T) {
h := NewEmailChannelMigrationHandler(nil)
assert.NotNil(t, h)
}
func TestNewEnterpriseAccountHandler_Nil_Cov10(t *testing.T) {
h := NewEnterpriseAccountHandler(nil)
assert.NotNil(t, h)
}
func TestNewFolderHandler_Nil_Cov10(t *testing.T) {
h := NewFolderHandler(nil)
assert.NotNil(t, h)
}
func TestNewInboxCsatTemplateHandler_Nil_Cov10(t *testing.T) {
h := NewInboxCsatTemplateHandler(nil)
assert.NotNil(t, h)
}
func TestNewInboxHandler_Nil_Cov10(t *testing.T) {
h := NewInboxHandler(nil)
assert.NotNil(t, h)
}
func TestNewInboxLimitHandler_Nil_Cov10(t *testing.T) {
h := NewInboxLimitHandler(nil)
assert.NotNil(t, h)
}
func TestNewInboxMemberHandler_Nil_Cov10(t *testing.T) {
h := NewInboxMemberHandler(nil)
assert.NotNil(t, h)
}
func TestNewInstallationConfigHandler_Nil_Cov10(t *testing.T) {
h := NewInstallationConfigHandler(nil)
assert.NotNil(t, h)
}
func TestNewIntegrationHookHandler_Nil_Cov10(t *testing.T) {
h := NewIntegrationHookHandler(nil)
assert.NotNil(t, h)
}
func TestNewLabelHandler_Nil_Cov10(t *testing.T) {
h := NewLabelHandler(nil, nil)
assert.NotNil(t, h)
}
func TestNewLinearIntegrationHandler_Nil_Cov10(t *testing.T) {
h := NewLinearIntegrationHandler(nil)
assert.NotNil(t, h)
}
func TestNewLiveReportHandler_Nil_Cov10(t *testing.T) {
h := NewLiveReportHandler(nil)
assert.NotNil(t, h)
}
func TestNewMacroHandler_Nil_Cov10(t *testing.T) {
h := NewMacroHandler(nil)
assert.NotNil(t, h)
}
func TestNewMessageHandler_Nil_Cov10(t *testing.T) {
h := NewMessageHandler(nil)
assert.NotNil(t, h)
}
func TestNewNoteHandler_Nil_Cov10(t *testing.T) {
h := NewNoteHandler(nil)
assert.NotNil(t, h)
}
func TestNewNotificationHandler_Nil_Cov10(t *testing.T) {
h := NewNotificationHandler(nil)
assert.NotNil(t, h)
}
func TestNewNotificationSettingHandler_Nil_Cov10(t *testing.T) {
h := NewNotificationSettingHandler(nil)
assert.NotNil(t, h)
}
func TestNewNotificationSubscriptionHandler_Nil_Cov10(t *testing.T) {
h := NewNotificationSubscriptionHandler(nil)
assert.NotNil(t, h)
}
func TestNewNotionIntegrationHandler_Nil_Cov10(t *testing.T) {
h := NewNotionIntegrationHandler(nil)
assert.NotNil(t, h)
}
func TestNewPlatformAppHandler_Nil_Cov10(t *testing.T) {
h := NewPlatformAppHandler(nil)
assert.NotNil(t, h)
}
func TestNewPlatformUserHandler_Nil_Cov10(t *testing.T) {
h := NewPlatformUserHandler(nil)
assert.NotNil(t, h)
}
func TestNewPlatformUserSSOHandler_Nil_Cov10(t *testing.T) {
h := NewPlatformUserSSOHandler()
assert.NotNil(t, h)
}
func TestNewPortalHandler_Nil_Cov10(t *testing.T) {
h := NewPortalHandler(nil)
assert.NotNil(t, h)
}
func TestNewPortalMemberHandler_Nil_Cov10(t *testing.T) {
h := NewPortalMemberHandler(nil)
assert.NotNil(t, h)
}
func TestNewProfileHandler_Nil_Cov10(t *testing.T) {
h := NewProfileHandler(nil)
assert.NotNil(t, h)
}
func TestNewPushSubscriptionHandler_Nil_Cov10(t *testing.T) {
h := NewPushSubscriptionHandler(nil)
assert.NotNil(t, h)
}
func TestNewRAGHandler_Nil_Cov10(t *testing.T) {
h := NewRAGHandler(nil)
assert.NotNil(t, h)
}
func TestNewReportingEventHandler_Nil_Cov10(t *testing.T) {
h := NewReportingEventHandler(nil)
assert.NotNil(t, h)
}
func TestNewSearchHandler_Nil_Cov10(t *testing.T) {
h := NewSearchHandler(nil)
assert.NotNil(t, h)
}
func TestNewShopifyIntegrationHandler_Nil_Cov10(t *testing.T) {
h := NewShopifyIntegrationHandler(nil)
assert.NotNil(t, h)
}
func TestNewSlackIntegrationHandler_Nil_Cov10(t *testing.T) {
h := NewSlackIntegrationHandler(nil)
assert.NotNil(t, h)
}
func TestNewSlaPolicyHandler_Nil_Cov10(t *testing.T) {
h := NewSlaPolicyHandler(nil)
assert.NotNil(t, h)
}
func TestNewSSEEventHandler_Nil_Cov10(t *testing.T) {
h := NewSSEEventHandler(nil)
assert.NotNil(t, h)
}
func TestNewSSEStreamHandler_Nil_Cov10(t *testing.T) {
h := NewSSEStreamHandler(nil, nil)
assert.NotNil(t, h)
}
func TestNewSummaryReportHandler_Nil_Cov10(t *testing.T) {
h := NewSummaryReportHandler(nil)
assert.NotNil(t, h)
}
func TestNewTeamHandler_Nil_Cov10(t *testing.T) {
h := NewTeamHandler(nil)
assert.NotNil(t, h)
}
func TestNewUploadHandler_Nil_Cov10(t *testing.T) {
h := NewUploadHandler(nil)
assert.NotNil(t, h)
}
func TestNewWebhookSubscriptionHandler_Nil_Cov10(t *testing.T) {
h := NewWebhookSubscriptionHandler(nil)
assert.NotNil(t, h)
}
func TestNewWebWidgetHandler_Nil_Cov10(t *testing.T) {
h := NewWebWidgetHandler(nil)
assert.NotNil(t, h)
}
func TestNewWebWidgetOfflineHandler_Nil_Cov10(t *testing.T) {
h := NewWebWidgetOfflineHandler(nil, nil)
assert.NotNil(t, h)
}
func TestNewWhatsAppCallHandler_Nil_Cov10(t *testing.T) {
h := NewWhatsAppCallHandler(nil)
assert.NotNil(t, h)
}
func TestNewWidgetTestHandler_Nil_Cov10(t *testing.T) {
h := NewWidgetTestHandler(nil)
assert.NotNil(t, h)
}
func TestNewWorkingHourHandler_Nil_Cov10(t *testing.T) {
h := NewWorkingHourHandler(nil)
assert.NotNil(t, h)
}
func TestNewYearInReviewHandler_Nil_Cov10(t *testing.T) {
h := NewYearInReviewHandler(nil)
assert.NotNil(t, h)
}
// =================================================================
// AccountHandler method tests with nil service
// =================================================================
func TestAccountHandler_List_Cov10(t *testing.T) {
h := NewAccountHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/accounts")
safeCall_Cov10(t, func() { h.List(c) })
}
func TestAccountHandler_Create_Cov10(t *testing.T) {
h := NewAccountHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/accounts", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestAccountHandler_Update_Cov10(t *testing.T) {
h := NewAccountHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/accounts/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestAccountHandler_UpdateOnboarding_Cov10(t *testing.T) {
h := NewAccountHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/accounts/1/onboarding", map[string]string{"id": "1"}, `{"step":"test"}`)
safeCall_Cov10(t, func() { h.UpdateOnboarding(c) })
}
func TestAccountHandler_HelpCenterGeneration_Cov10(t *testing.T) {
h := NewAccountHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/accounts/1/help_center_generation", map[string]string{"id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.HelpCenterGeneration(c) })
}
func TestAccountHandler_Delete_Cov10(t *testing.T) {
h := NewAccountHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/accounts/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestAccountHandler_ListUsers_Cov10(t *testing.T) {
h := NewAccountHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/accounts/1/users", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ListUsers(c) })
}
func TestAccountHandler_AddUser_Cov10(t *testing.T) {
h := NewAccountHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/accounts/1/users", map[string]string{"id": "1"}, `{"user_id":1}`)
safeCall_Cov10(t, func() { h.AddUser(c) })
}
func TestAccountHandler_RemoveUser_Cov10(t *testing.T) {
h := NewAccountHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/accounts/1/users/1", map[string]string{"id": "1", "user_id": "1"})
safeCall_Cov10(t, func() { h.RemoveUser(c) })
}
func TestAccountHandler_GetAll_Cov10(t *testing.T) {
h := NewAccountHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/accounts/all")
safeCall_Cov10(t, func() { h.GetAll(c) })
}
func TestAccountHandler_GetAgents_Cov10(t *testing.T) {
h := NewAccountHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/accounts/1/agents", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.GetAgents(c) })
}
func TestAccountHandler_UpdateSettings_Cov10(t *testing.T) {
h := NewAccountHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/accounts/1/settings", map[string]string{"id": "1"}, `{"key":"val"}`)
safeCall_Cov10(t, func() { h.UpdateSettings(c) })
}
func TestAccountHandler_UpdateActiveAt_Cov10(t *testing.T) {
h := NewAccountHandler(nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/accounts/1/active", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.UpdateActiveAt(c) })
}
func TestAccountHandler_CacheKeys_Cov10(t *testing.T) {
h := NewAccountHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/accounts/1/cache_keys", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.CacheKeys(c) })
}
// =================================================================
// AgentBotHandler method tests with nil service
// =================================================================
func TestAgentBotHandler_List_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/agent_bots")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestAgentBotHandler_Get_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/agent_bots/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestAgentBotHandler_Create_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/agent_bots", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestAgentBotHandler_Update_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/agent_bots/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestAgentBotHandler_Delete_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/agent_bots/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestAgentBotHandler_ResetToken_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/agent_bots/1/reset_token", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ResetToken(c) })
}
func TestAgentBotHandler_ResetSecret_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/agent_bots/1/reset_secret", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ResetSecret(c) })
}
func TestAgentBotHandler_DeleteAvatar_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/agent_bots/1/avatar", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.DeleteAvatar(c) })
}
func TestAgentBotHandler_PlatformList_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/platform/agent_bots")
safeCall_Cov10(t, func() { h.PlatformList(c) })
}
func TestAgentBotHandler_PlatformCreate_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/platform/agent_bots", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.PlatformCreate(c) })
}
func TestAgentBotHandler_PlatformGet_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/platform/agent_bots/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.PlatformGet(c) })
}
func TestAgentBotHandler_PlatformUpdate_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/platform/agent_bots/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.PlatformUpdate(c) })
}
func TestAgentBotHandler_PlatformDelete_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/platform/agent_bots/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.PlatformDelete(c) })
}
func TestAgentBotHandler_PlatformUpdateAvatar_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/platform/agent_bots/1/avatar", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.PlatformUpdateAvatar(c) })
}
func TestAgentBotHandler_PlatformResetConfig_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/platform/agent_bots/1/reset_config", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.PlatformResetConfig(c) })
}
func TestAgentBotHandler_ListAccessible_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/agent_bots/accessible")
safeCall_Cov10(t, func() { h.ListAccessible(c) })
}
func TestAgentBotHandler_UpdateAvatar_Cov10(t *testing.T) {
h := NewAgentBotHandler(nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/agent_bots/1/avatar", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.UpdateAvatar(c) })
}
// =================================================================
// AgentBotInboxHandler method tests
// =================================================================
func TestAgentBotInboxHandler_Bind_Cov10(t *testing.T) {
h := NewAgentBotInboxHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/agent_bots/1/inboxes", `{"inbox_id":1}`)
safeCall_Cov10(t, func() { h.Bind(c) })
}
func TestAgentBotInboxHandler_Unbind_Cov10(t *testing.T) {
h := NewAgentBotInboxHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/agent_bots/1/inboxes/1", map[string]string{"id": "1", "inbox_id": "1"})
safeCall_Cov10(t, func() { h.Unbind(c) })
}
func TestAgentBotInboxHandler_UpdateStatus_Cov10(t *testing.T) {
h := NewAgentBotInboxHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/agent_bots/1/inboxes/1", map[string]string{"id": "1", "inbox_id": "1"}, `{"status":"active"}`)
safeCall_Cov10(t, func() { h.UpdateStatus(c) })
}
func TestAgentBotInboxHandler_ListByInbox_Cov10(t *testing.T) {
h := NewAgentBotInboxHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/inboxes/1/agent_bots", map[string]string{"inbox_id": "1"})
safeCall_Cov10(t, func() { h.ListByInbox(c) })
}
func TestAgentBotInboxHandler_ListByBot_Cov10(t *testing.T) {
h := NewAgentBotInboxHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/agent_bots/1/inboxes", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ListByBot(c) })
}
// =================================================================
// AgentBulkHandler method tests
// =================================================================
func TestAgentBulkHandler_BulkAssign_Cov10(t *testing.T) {
h := NewAgentBulkHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/agents/bulk_assign", `{"conversation_ids":[1],"agent_id":1}`)
safeCall_Cov10(t, func() { h.BulkAssign(c) })
}
func TestAgentBulkHandler_BulkUnassign_Cov10(t *testing.T) {
h := NewAgentBulkHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/agents/bulk_unassign", `{"conversation_ids":[1]}`)
safeCall_Cov10(t, func() { h.BulkUnassign(c) })
}
// =================================================================
// AgentCapacityHandler method tests
// =================================================================
func TestAgentCapacityHandler_List_Cov10(t *testing.T) {
h := NewAgentCapacityHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/agent_capacity_policies")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestAgentCapacityHandler_Create_Cov10(t *testing.T) {
h := NewAgentCapacityHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/agent_capacity_policies", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestAgentCapacityHandler_Get_Cov10(t *testing.T) {
h := NewAgentCapacityHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/agent_capacity_policies/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestAgentCapacityHandler_Update_Cov10(t *testing.T) {
h := NewAgentCapacityHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/agent_capacity_policies/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestAgentCapacityHandler_Delete_Cov10(t *testing.T) {
h := NewAgentCapacityHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/agent_capacity_policies/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestAgentCapacityHandler_CreateInboxLimit_Cov10(t *testing.T) {
h := NewAgentCapacityHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/agent_capacity_policies/1/inbox_limits", map[string]string{"id": "1"}, `{"inbox_id":1}`)
safeCall_Cov10(t, func() { h.CreateInboxLimit(c) })
}
func TestAgentCapacityHandler_UpdateInboxLimit_Cov10(t *testing.T) {
h := NewAgentCapacityHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/agent_capacity_policies/1/inbox_limits/1", map[string]string{"id": "1", "inbox_id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.UpdateInboxLimit(c) })
}
func TestAgentCapacityHandler_DeleteInboxLimit_Cov10(t *testing.T) {
h := NewAgentCapacityHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/agent_capacity_policies/1/inbox_limits/1", map[string]string{"id": "1", "inbox_id": "1"})
safeCall_Cov10(t, func() { h.DeleteInboxLimit(c) })
}
func TestAgentCapacityHandler_ListUsers_Cov10(t *testing.T) {
h := NewAgentCapacityHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/agent_capacity_policies/1/users", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ListUsers(c) })
}
func TestAgentCapacityHandler_CreateUser_Cov10(t *testing.T) {
h := NewAgentCapacityHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/agent_capacity_policies/1/users", map[string]string{"id": "1"}, `{"user_id":1}`)
safeCall_Cov10(t, func() { h.CreateUser(c) })
}
func TestAgentCapacityHandler_DeleteUser_Cov10(t *testing.T) {
h := NewAgentCapacityHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/agent_capacity_policies/1/users/1", map[string]string{"id": "1", "user_id": "1"})
safeCall_Cov10(t, func() { h.DeleteUser(c) })
}
// =================================================================
// AgentHandler method tests
// =================================================================
func TestAgentHandler_List_Cov10(t *testing.T) {
h := NewAgentHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/agents")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestAgentHandler_Get_Cov10(t *testing.T) {
h := NewAgentHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/agents/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestAgentHandler_Create_Cov10(t *testing.T) {
h := NewAgentHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/agents", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestAgentHandler_Update_Cov10(t *testing.T) {
h := NewAgentHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/agents/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestAgentHandler_Delete_Cov10(t *testing.T) {
h := NewAgentHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/agents/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestAgentHandler_ResetPassword_Cov10(t *testing.T) {
h := NewAgentHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/agents/1/reset_password", map[string]string{"id": "1"}, `{"password":"newpass"}`)
safeCall_Cov10(t, func() { h.ResetPassword(c) })
}
func TestAgentHandler_BulkCreate_Cov10(t *testing.T) {
h := NewAgentHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/agents/bulk_create", `[{"name":"test"}]`)
safeCall_Cov10(t, func() { h.BulkCreate(c) })
}
// =================================================================
// AnalyticsHandler method tests
// =================================================================
func TestAnalyticsHandler_Index_Cov10(t *testing.T) {
h := NewAnalyticsHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/analytics")
safeCall_Cov10(t, func() { h.Index(c) })
}
func TestAnalyticsHandler_Drilldown_Cov10(t *testing.T) {
h := NewAnalyticsHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/analytics/drilldown", nil)
safeCall_Cov10(t, func() { h.Drilldown(c) })
}
func TestAnalyticsHandler_Summary_Cov10(t *testing.T) {
h := NewAnalyticsHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/analytics/summary")
safeCall_Cov10(t, func() { h.Summary(c) })
}
func TestAnalyticsHandler_AgentMetrics_Cov10(t *testing.T) {
h := NewAnalyticsHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/analytics/agent_metrics")
safeCall_Cov10(t, func() { h.AgentMetrics(c) })
}
func TestAnalyticsHandler_InboxMetrics_Cov10(t *testing.T) {
h := NewAnalyticsHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/analytics/inbox_metrics")
safeCall_Cov10(t, func() { h.InboxMetrics(c) })
}
func TestAnalyticsHandler_LabelMetrics_Cov10(t *testing.T) {
h := NewAnalyticsHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/analytics/label_metrics")
safeCall_Cov10(t, func() { h.LabelMetrics(c) })
}
func TestAnalyticsHandler_TeamMetrics_Cov10(t *testing.T) {
h := NewAnalyticsHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/analytics/team_metrics")
safeCall_Cov10(t, func() { h.TeamMetrics(c) })
}
func TestAnalyticsHandler_ConversationTraffic_Cov10(t *testing.T) {
h := NewAnalyticsHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/analytics/conversation_traffic")
safeCall_Cov10(t, func() { h.ConversationTraffic(c) })
}
func TestAnalyticsHandler_BotSummary_Cov10(t *testing.T) {
h := NewAnalyticsHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/analytics/bot_summary")
safeCall_Cov10(t, func() { h.BotSummary(c) })
}
func TestAnalyticsHandler_Conversations_Cov10(t *testing.T) {
h := NewAnalyticsHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/analytics/conversations")
safeCall_Cov10(t, func() { h.Conversations(c) })
}
func TestAnalyticsHandler_ConversationsSummary_Cov10(t *testing.T) {
h := NewAnalyticsHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/analytics/conversations_summary")
safeCall_Cov10(t, func() { h.ConversationsSummary(c) })
}
func TestAnalyticsHandler_BotMetrics_Cov10(t *testing.T) {
h := NewAnalyticsHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/analytics/bot_metrics")
safeCall_Cov10(t, func() { h.BotMetrics(c) })
}
func TestAnalyticsHandler_InboxLabelMatrix_Cov10(t *testing.T) {
h := NewAnalyticsHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/analytics/inbox_label_matrix")
safeCall_Cov10(t, func() { h.InboxLabelMatrix(c) })
}
func TestAnalyticsHandler_FirstResponseTimeDistribution_Cov10(t *testing.T) {
h := NewAnalyticsHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/analytics/first_response_time_distribution")
safeCall_Cov10(t, func() { h.FirstResponseTimeDistribution(c) })
}
func TestAnalyticsHandler_OutgoingMessagesCount_Cov10(t *testing.T) {
h := NewAnalyticsHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/analytics/outgoing_messages_count")
safeCall_Cov10(t, func() { h.OutgoingMessagesCount(c) })
}
// =================================================================
// ArticleHandler method tests
// =================================================================
func TestArticleHandler_PublicList_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/portals/1/articles")
safeCall_Cov10(t, func() { h.PublicList(c) })
}
func TestArticleHandler_PublicSearch_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/portals/1/articles/search?q=test")
safeCall_Cov10(t, func() { h.PublicSearch(c) })
}
func TestArticleHandler_PublicTrackingPixel_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/portals/1/articles/1/tracking_pixel.png", map[string]string{"portal_slug": "test", "article_slug": "test"})
safeCall_Cov10(t, func() { h.PublicTrackingPixel(c) })
}
func TestArticleHandler_Create_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/articles", `{"title":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestArticleHandler_Get_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/articles/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestArticleHandler_Edit_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/articles/1/edit", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Edit(c) })
}
func TestArticleHandler_Update_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/articles/1", map[string]string{"id": "1"}, `{"title":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestArticleHandler_Delete_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/articles/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestArticleHandler_List_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/articles")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestArticleHandler_ListByCategory_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/categories/1/articles", map[string]string{"category_id": "1"})
safeCall_Cov10(t, func() { h.ListByCategory(c) })
}
func TestArticleHandler_Search_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/articles/search?q=test")
safeCall_Cov10(t, func() { h.Search(c) })
}
func TestArticleHandler_SemanticSearch_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/articles/semantic_search?q=test")
safeCall_Cov10(t, func() { h.SemanticSearch(c) })
}
func TestArticleHandler_StatusCounts_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/articles/status_counts")
safeCall_Cov10(t, func() { h.StatusCounts(c) })
}
func TestArticleHandler_Reorder_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/articles/reorder", `[{"id":1}]`)
safeCall_Cov10(t, func() { h.Reorder(c) })
}
func TestArticleHandler_BulkUpdateStatus_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/articles/bulk_update_status", `{"ids":[1],"status":"published"}`)
safeCall_Cov10(t, func() { h.BulkUpdateStatus(c) })
}
func TestArticleHandler_BulkUpdateCategory_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/articles/bulk_update_category", `{"ids":[1],"category_id":1}`)
safeCall_Cov10(t, func() { h.BulkUpdateCategory(c) })
}
func TestArticleHandler_BulkDelete_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/articles/bulk_delete", `{"ids":[1]}`)
safeCall_Cov10(t, func() { h.BulkDelete(c) })
}
func TestArticleHandler_BulkTranslate_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/articles/bulk_translate", `{"ids":[1],"language":"en"}`)
safeCall_Cov10(t, func() { h.BulkTranslate(c) })
}
func TestArticleHandler_BulkActions_Cov10(t *testing.T) {
h := NewArticleHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/articles/bulk_actions", `{"ids":[1],"action":"publish"}`)
safeCall_Cov10(t, func() { h.BulkActions(c) })
}
// =================================================================
// AssignmentPolicyHandler method tests
// =================================================================
func TestAssignmentPolicyHandler_ListAccountPolicies_Cov10(t *testing.T) {
h := NewAssignmentPolicyHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/assignment_policies")
safeCall_Cov10(t, func() { h.ListAccountPolicies(c) })
}
func TestAssignmentPolicyHandler_GetAccountPolicy_Cov10(t *testing.T) {
h := NewAssignmentPolicyHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/assignment_policies/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.GetAccountPolicy(c) })
}
func TestAssignmentPolicyHandler_CreateAccountPolicy_Cov10(t *testing.T) {
h := NewAssignmentPolicyHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/assignment_policies", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.CreateAccountPolicy(c) })
}
func TestAssignmentPolicyHandler_UpdateAccountPolicy_Cov10(t *testing.T) {
h := NewAssignmentPolicyHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/assignment_policies/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.UpdateAccountPolicy(c) })
}
func TestAssignmentPolicyHandler_DeleteAccountPolicy_Cov10(t *testing.T) {
h := NewAssignmentPolicyHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/assignment_policies/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.DeleteAccountPolicy(c) })
}
func TestAssignmentPolicyHandler_GetInboxPolicy_Cov10(t *testing.T) {
h := NewAssignmentPolicyHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/inboxes/1/assignment_policy", map[string]string{"inbox_id": "1"})
safeCall_Cov10(t, func() { h.GetInboxPolicy(c) })
}
func TestAssignmentPolicyHandler_ListPolicyInboxes_Cov10(t *testing.T) {
h := NewAssignmentPolicyHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/assignment_policies/1/inboxes", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ListPolicyInboxes(c) })
}
func TestAssignmentPolicyHandler_AddPolicyInbox_Cov10(t *testing.T) {
h := NewAssignmentPolicyHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/assignment_policies/1/inboxes", map[string]string{"id": "1"}, `{"inbox_id":1}`)
safeCall_Cov10(t, func() { h.AddPolicyInbox(c) })
}
func TestAssignmentPolicyHandler_RemovePolicyInbox_Cov10(t *testing.T) {
h := NewAssignmentPolicyHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/assignment_policies/1/inboxes/1", map[string]string{"id": "1", "inbox_id": "1"})
safeCall_Cov10(t, func() { h.RemovePolicyInbox(c) })
}
func TestAssignmentPolicyHandler_CreateInboxPolicy_Cov10(t *testing.T) {
h := NewAssignmentPolicyHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/inboxes/1/assignment_policy", map[string]string{"inbox_id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.CreateInboxPolicy(c) })
}
func TestAssignmentPolicyHandler_UpdateInboxPolicy_Cov10(t *testing.T) {
h := NewAssignmentPolicyHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/inboxes/1/assignment_policy/1", map[string]string{"inbox_id": "1", "id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.UpdateInboxPolicy(c) })
}
func TestAssignmentPolicyHandler_DeleteInboxPolicy_Cov10(t *testing.T) {
h := NewAssignmentPolicyHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/inboxes/1/assignment_policy/1", map[string]string{"inbox_id": "1", "id": "1"})
safeCall_Cov10(t, func() { h.DeleteInboxPolicy(c) })
}
func TestAssignmentPolicyHandler_DeleteCurrentInboxPolicy_Cov10(t *testing.T) {
h := NewAssignmentPolicyHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/inboxes/1/assignment_policy", map[string]string{"inbox_id": "1"})
safeCall_Cov10(t, func() { h.DeleteCurrentInboxPolicy(c) })
}
// =================================================================
// AssignmentPolicyV2Handler method tests
// =================================================================
func TestAssignmentPolicyV2Handler_Create_Cov10(t *testing.T) {
h := NewAssignmentPolicyV2Handler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/assignment_policies_v2", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestAssignmentPolicyV2Handler_Get_Cov10(t *testing.T) {
h := NewAssignmentPolicyV2Handler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/assignment_policies_v2/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestAssignmentPolicyV2Handler_List_Cov10(t *testing.T) {
h := NewAssignmentPolicyV2Handler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/assignment_policies_v2")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestAssignmentPolicyV2Handler_Update_Cov10(t *testing.T) {
h := NewAssignmentPolicyV2Handler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/assignment_policies_v2/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestAssignmentPolicyV2Handler_Delete_Cov10(t *testing.T) {
h := NewAssignmentPolicyV2Handler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/assignment_policies_v2/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestAssignmentPolicyV2Handler_ListInboxes_Cov10(t *testing.T) {
h := NewAssignmentPolicyV2Handler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/assignment_policies_v2/1/inboxes", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ListInboxes(c) })
}
func TestAssignmentPolicyV2Handler_AddInbox_Cov10(t *testing.T) {
h := NewAssignmentPolicyV2Handler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/assignment_policies_v2/1/inboxes", map[string]string{"id": "1"}, `{"inbox_id":1}`)
safeCall_Cov10(t, func() { h.AddInbox(c) })
}
func TestAssignmentPolicyV2Handler_RemoveInbox_Cov10(t *testing.T) {
h := NewAssignmentPolicyV2Handler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/assignment_policies_v2/1/inboxes/1", map[string]string{"id": "1", "inbox_id": "1"})
safeCall_Cov10(t, func() { h.RemoveInbox(c) })
}
func TestAssignmentPolicyV2Handler_GetInboxPolicy_Cov10(t *testing.T) {
h := NewAssignmentPolicyV2Handler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/inboxes/1/assignment_policy_v2", map[string]string{"inbox_id": "1"})
safeCall_Cov10(t, func() { h.GetInboxPolicy(c) })
}
func TestAssignmentPolicyV2Handler_SetInboxPolicy_Cov10(t *testing.T) {
h := NewAssignmentPolicyV2Handler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/inboxes/1/assignment_policy_v2", map[string]string{"inbox_id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.SetInboxPolicy(c) })
}
func TestAssignmentPolicyV2Handler_DeleteInboxPolicy_Cov10(t *testing.T) {
h := NewAssignmentPolicyV2Handler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/inboxes/1/assignment_policy_v2", map[string]string{"inbox_id": "1"})
safeCall_Cov10(t, func() { h.DeleteInboxPolicy(c) })
}
// =================================================================
// AuditHandler method tests
// =================================================================
func TestAuditHandler_List_Cov10(t *testing.T) {
t.Skip("compile error")
}
func TestAuditHandler_Get_Cov10(t *testing.T) {
h := NewAuditHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/audits/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
// =================================================================
// AuthHandler method tests
// =================================================================
func TestAuthHandler_Login_Cov10(t *testing.T) {
h := NewAuthHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/auth/login", `{"email":"test@test.com","password":"pass"}`)
safeCall_Cov10(t, func() { h.Login(c) })
}
func TestAuthHandler_ChatwootSignIn_Cov10(t *testing.T) {
h := NewAuthHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/auth/chatwoot/sign_in", `{"email":"test@test.com"}`)
safeCall_Cov10(t, func() { h.ChatwootSignIn(c) })
}
func TestAuthHandler_ChatwootValidateToken_Cov10(t *testing.T) {
h := NewAuthHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/auth/chatwoot/validate_token")
safeCall_Cov10(t, func() { h.ChatwootValidateToken(c) })
}
func TestAuthHandler_ChatwootSignOut_Cov10(t *testing.T) {
h := NewAuthHandler(nil)
c, _ := newCtx_Cov10("DELETE", "/api/v1/auth/chatwoot/sign_out")
safeCall_Cov10(t, func() { h.ChatwootSignOut(c) })
}
func TestAuthHandler_Refresh_Cov10(t *testing.T) {
h := NewAuthHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/auth/refresh")
safeCall_Cov10(t, func() { h.Refresh(c) })
}
func TestAuthHandler_Logout_Cov10(t *testing.T) {
h := NewAuthHandler(nil)
c, _ := newCtx_Cov10("DELETE", "/api/v1/auth/logout")
safeCall_Cov10(t, func() { h.Logout(c) })
}
func TestAuthHandler_SwitchAccount_Cov10(t *testing.T) {
h := NewAuthHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/auth/switch_account", `{"account_id":1}`)
safeCall_Cov10(t, func() { h.SwitchAccount(c) })
}
func TestAuthHandler_ConfirmResetPassword_Cov10(t *testing.T) {
h := NewAuthHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/auth/password/reset", `{"token":"abc","password":"newpass"}`)
safeCall_Cov10(t, func() { h.ConfirmResetPassword(c) })
}
func TestAuthHandler_ConfirmEmail_Cov10(t *testing.T) {
h := NewAuthHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/auth/email_confirm", map[string]string{"token": "abc"})
safeCall_Cov10(t, func() { h.ConfirmEmail(c) })
}
func TestAuthHandler_ChatwootConfirmEmail_Cov10(t *testing.T) {
h := NewAuthHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/auth/chatwoot/email_confirm", map[string]string{"token": "abc"})
safeCall_Cov10(t, func() { h.ChatwootConfirmEmail(c) })
}
// =================================================================
// AutomationRuleHandler method tests
// =================================================================
func TestAutomationRuleHandler_List_Cov10(t *testing.T) {
h := NewAutomationRuleHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/automation_rules")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestAutomationRuleHandler_Create_Cov10(t *testing.T) {
h := NewAutomationRuleHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/automation_rules", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestAutomationRuleHandler_Update_Cov10(t *testing.T) {
h := NewAutomationRuleHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/automation_rules/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestAutomationRuleHandler_Delete_Cov10(t *testing.T) {
h := NewAutomationRuleHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/automation_rules/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestAutomationRuleHandler_ToggleActive_Cov10(t *testing.T) {
h := NewAutomationRuleHandler(nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/automation_rules/1/toggle_active", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ToggleActive(c) })
}
// =================================================================
// AutoReplyRuleHandler, BannerHandler, BotRuleHandler tests
// =================================================================
func TestAutoReplyRuleHandler_List_Cov10(t *testing.T) {
h := NewAutoReplyRuleHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/auto_reply_rules")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestAutoReplyRuleHandler_Evaluate_Cov10(t *testing.T) {
h := NewAutoReplyRuleHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/auto_reply_rules/evaluate", `{"message":"test"}`)
safeCall_Cov10(t, func() { h.Evaluate(c) })
}
func TestBannerHandler_List_Cov10(t *testing.T) {
h := NewBannerHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/banners")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestBannerHandler_Get_Cov10(t *testing.T) {
h := NewBannerHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/banners/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestBannerHandler_Create_Cov10(t *testing.T) {
h := NewBannerHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/banners", `{"title":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestBannerHandler_Update_Cov10(t *testing.T) {
h := NewBannerHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/banners/1", map[string]string{"id": "1"}, `{"title":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestBannerHandler_Delete_Cov10(t *testing.T) {
h := NewBannerHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/banners/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestBannerHandler_ListActive_Cov10(t *testing.T) {
h := NewBannerHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/banners/active")
safeCall_Cov10(t, func() { h.ListActive(c) })
}
func TestBotRuleHandler_List_Cov10(t *testing.T) {
h := NewBotRuleHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/bot_rules")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestBotRuleHandler_ListByBot_Cov10(t *testing.T) {
h := NewBotRuleHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/bot_rules/by_bot/1", map[string]string{"bot_id": "1"})
safeCall_Cov10(t, func() { h.ListByBot(c) })
}
func TestBotRuleHandler_Create_Cov10(t *testing.T) {
h := NewBotRuleHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/bot_rules", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestBotRuleHandler_Update_Cov10(t *testing.T) {
h := NewBotRuleHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/bot_rules/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestBotRuleHandler_Delete_Cov10(t *testing.T) {
h := NewBotRuleHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/bot_rules/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestBotRuleHandler_ToggleStatus_Cov10(t *testing.T) {
h := NewBotRuleHandler(nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/bot_rules/1/toggle_status", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ToggleStatus(c) })
}
// =================================================================
// BotTriggerConfigHandler tests
// =================================================================
func TestBotTriggerConfigHandler_List_Cov10(t *testing.T) {
h := NewBotTriggerConfigHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/bot_trigger_configs")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestBotTriggerConfigHandler_ListByBot_Cov10(t *testing.T) {
h := NewBotTriggerConfigHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/bot_trigger_configs/by_bot/1", map[string]string{"bot_id": "1"})
safeCall_Cov10(t, func() { h.ListByBot(c) })
}
func TestBotTriggerConfigHandler_Create_Cov10(t *testing.T) {
h := NewBotTriggerConfigHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/bot_trigger_configs", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestBotTriggerConfigHandler_Update_Cov10(t *testing.T) {
h := NewBotTriggerConfigHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/bot_trigger_configs/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestBotTriggerConfigHandler_Delete_Cov10(t *testing.T) {
h := NewBotTriggerConfigHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/bot_trigger_configs/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestBotTriggerConfigHandler_ToggleActive_Cov10(t *testing.T) {
h := NewBotTriggerConfigHandler(nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/bot_trigger_configs/1/toggle_active", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ToggleActive(c) })
}
// =================================================================
// BulkActionHandler tests
// =================================================================
func TestBulkActionHandler_Create_Cov10(t *testing.T) {
h := NewBulkActionHandler(nil, nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/bulk_actions", `{"type":"conversation","action":"assign"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
// =================================================================
// CampaignHandler tests
// =================================================================
func TestCampaignHandler_List_Cov10(t *testing.T) {
h := NewCampaignHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/campaigns")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCampaignHandler_Create_Cov10(t *testing.T) {
h := NewCampaignHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/campaigns", `{"title":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
// =================================================================
// CannedResponseHandler tests
// =================================================================
func TestCannedResponseHandler_Create_Cov10(t *testing.T) {
h := NewCannedResponseHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/canned_responses", `{"content":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestCannedResponseHandler_Get_Cov10(t *testing.T) {
h := NewCannedResponseHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/canned_responses/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestCannedResponseHandler_Update_Cov10(t *testing.T) {
h := NewCannedResponseHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/canned_responses/1", map[string]string{"id": "1"}, `{"content":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestCannedResponseHandler_Delete_Cov10(t *testing.T) {
h := NewCannedResponseHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/canned_responses/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCannedResponseHandler_List_Cov10(t *testing.T) {
h := NewCannedResponseHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/canned_responses")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCannedResponseHandler_Search_Cov10(t *testing.T) {
h := NewCannedResponseHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/canned_responses/search?q=test")
safeCall_Cov10(t, func() { h.Search(c) })
}
// =================================================================
// CaptainAssistantHandler tests
// =================================================================
func TestCaptainAssistantHandler_Create_Cov10(t *testing.T) {
h := NewCaptainAssistantHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/captain/assistants", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestCaptainAssistantHandler_Get_Cov10(t *testing.T) {
h := NewCaptainAssistantHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/captain/assistants/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestCaptainAssistantHandler_Update_Cov10(t *testing.T) {
h := NewCaptainAssistantHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/captain/assistants/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestCaptainAssistantHandler_Delete_Cov10(t *testing.T) {
h := NewCaptainAssistantHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/captain/assistants/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCaptainAssistantHandler_List_Cov10(t *testing.T) {
h := NewCaptainAssistantHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/captain/assistants")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCaptainAssistantHandler_Stats_Cov10(t *testing.T) {
h := NewCaptainAssistantHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/captain/assistants/1/stats", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Stats(c) })
}
func TestCaptainAssistantHandler_Summary_Cov10(t *testing.T) {
h := NewCaptainAssistantHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/captain/assistants/1/summary", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Summary(c) })
}
func TestCaptainAssistantHandler_Drilldown_Cov10(t *testing.T) {
h := NewCaptainAssistantHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/captain/assistants/1/drilldown", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Drilldown(c) })
}
func TestCaptainAssistantHandler_GetConfig_Cov10(t *testing.T) {
h := NewCaptainAssistantHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/captain/assistants/1/config", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.GetConfig(c) })
}
func TestCaptainAssistantHandler_SetConfig_Cov10(t *testing.T) {
h := NewCaptainAssistantHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/captain/assistants/1/config", map[string]string{"id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.SetConfig(c) })
}
func TestCaptainAssistantHandler_AssociateInbox_Cov10(t *testing.T) {
h := NewCaptainAssistantHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/captain/assistants/1/inboxes", map[string]string{"id": "1"}, `{"inbox_id":1}`)
safeCall_Cov10(t, func() { h.AssociateInbox(c) })
}
func TestCaptainAssistantHandler_DissociateInbox_Cov10(t *testing.T) {
h := NewCaptainAssistantHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/captain/assistants/1/inboxes/1", map[string]string{"id": "1", "inbox_id": "1"})
safeCall_Cov10(t, func() { h.DissociateInbox(c) })
}
func TestCaptainAssistantHandler_ListInboxes_Cov10(t *testing.T) {
h := NewCaptainAssistantHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/captain/assistants/1/inboxes", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ListInboxes(c) })
}
func TestCaptainAssistantHandler_GenerateResponse_Cov10(t *testing.T) {
h := NewCaptainAssistantHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/captain/assistants/1/generate_response", map[string]string{"id": "1"}, `{"message":"test"}`)
safeCall_Cov10(t, func() { h.GenerateResponse(c) })
}
// =================================================================
// CaptainAssistantResponseHandler tests
// =================================================================
func TestCaptainAssistantResponseHandler_ProcessResponse_Cov10(t *testing.T) {
h := NewCaptainAssistantResponseHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/captain/response", `{"message":"test"}`)
safeCall_Cov10(t, func() { h.ProcessResponse(c) })
}
func TestCaptainAssistantResponseHandler_List_Cov10(t *testing.T) {
h := NewCaptainAssistantResponseHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/captain/responses")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCaptainAssistantResponseHandler_Get_Cov10(t *testing.T) {
h := NewCaptainAssistantResponseHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/captain/responses/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestCaptainAssistantResponseHandler_Create_Cov10(t *testing.T) {
h := NewCaptainAssistantResponseHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/captain/responses", `{"content":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestCaptainAssistantResponseHandler_Update_Cov10(t *testing.T) {
h := NewCaptainAssistantResponseHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/captain/responses/1", map[string]string{"id": "1"}, `{"content":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestCaptainAssistantResponseHandler_Delete_Cov10(t *testing.T) {
h := NewCaptainAssistantResponseHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/captain/responses/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
// =================================================================
// CaptainBulkActionHandler tests
// =================================================================
func TestCaptainBulkActionHandler_Execute_Cov10(t *testing.T) {
h := NewCaptainBulkActionHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/captain/bulk_actions", `{"action":"test"}`)
safeCall_Cov10(t, func() { h.Execute(c) })
}
// =================================================================
// CaptainConversationHandler tests
// =================================================================
func TestCaptainConversationHandler_BuildResponse_Cov10(t *testing.T) {
h := NewCaptainConversationHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/captain/conversations/1/build_response", map[string]string{"id": "1"}, `{"message":"test"}`)
safeCall_Cov10(t, func() { h.BuildResponse(c) })
}
// =================================================================
// CaptainCustomToolHandler tests
// =================================================================
func TestCaptainCustomToolHandler_Create_Cov10(t *testing.T) {
h := NewCaptainCustomToolHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/captain/custom_tools", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestCaptainCustomToolHandler_Get_Cov10(t *testing.T) {
h := NewCaptainCustomToolHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/captain/custom_tools/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestCaptainCustomToolHandler_Update_Cov10(t *testing.T) {
h := NewCaptainCustomToolHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/captain/custom_tools/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestCaptainCustomToolHandler_Delete_Cov10(t *testing.T) {
h := NewCaptainCustomToolHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/captain/custom_tools/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCaptainCustomToolHandler_List_Cov10(t *testing.T) {
h := NewCaptainCustomToolHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/captain/custom_tools")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCaptainCustomToolHandler_ExecuteTool_Cov10(t *testing.T) {
h := NewCaptainCustomToolHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/captain/custom_tools/1/execute", map[string]string{"id": "1"}, `{"input":"test"}`)
safeCall_Cov10(t, func() { h.ExecuteTool(c) })
}
func TestCaptainCustomToolHandler_TestTool_Cov10(t *testing.T) {
h := NewCaptainCustomToolHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/captain/custom_tools/1/test", map[string]string{"id": "1"}, `{"input":"test"}`)
safeCall_Cov10(t, func() { h.TestTool(c) })
}
// =================================================================
// CaptainDocumentHandler tests
// =================================================================
func TestCaptainDocumentHandler_Create_Cov10(t *testing.T) {
h := NewCaptainDocumentHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/captain/documents", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestCaptainDocumentHandler_Get_Cov10(t *testing.T) {
h := NewCaptainDocumentHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/captain/documents/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestCaptainDocumentHandler_Update_Cov10(t *testing.T) {
h := NewCaptainDocumentHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/captain/documents/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestCaptainDocumentHandler_Delete_Cov10(t *testing.T) {
h := NewCaptainDocumentHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/captain/documents/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCaptainDocumentHandler_List_Cov10(t *testing.T) {
h := NewCaptainDocumentHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/captain/documents")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCaptainDocumentHandler_ProcessDocument_Cov10(t *testing.T) {
h := NewCaptainDocumentHandler(nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/captain/documents/1/process", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ProcessDocument(c) })
}
func TestCaptainDocumentHandler_SyncDocument_Cov10(t *testing.T) {
h := NewCaptainDocumentHandler(nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/captain/documents/1/sync", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.SyncDocument(c) })
}
// =================================================================
// CaptainPreferenceHandler tests
// =================================================================
func TestCaptainPreferenceHandler_Create_Cov10(t *testing.T) {
h := NewCaptainPreferenceHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/captain/preferences", `{"key":"val"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestCaptainPreferenceHandler_Get_Cov10(t *testing.T) {
h := NewCaptainPreferenceHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/captain/preferences")
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestCaptainPreferenceHandler_Update_Cov10(t *testing.T) {
h := NewCaptainPreferenceHandler(nil)
c, _ := newCtxBody_Cov10("PUT", "/api/v1/captain/preferences", `{"key":"val"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestCaptainPreferenceHandler_Delete_Cov10(t *testing.T) {
h := NewCaptainPreferenceHandler(nil)
c, _ := newCtx_Cov10("DELETE", "/api/v1/captain/preferences")
safeCall_Cov10(t, func() { h.Delete(c) })
}
// =================================================================
// CaptainScenarioHandler tests
// =================================================================
func TestCaptainScenarioHandler_Create_Cov10(t *testing.T) {
h := NewCaptainScenarioHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/captain/scenarios", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestCaptainScenarioHandler_Get_Cov10(t *testing.T) {
h := NewCaptainScenarioHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/captain/scenarios/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestCaptainScenarioHandler_Update_Cov10(t *testing.T) {
h := NewCaptainScenarioHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/captain/scenarios/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestCaptainScenarioHandler_Delete_Cov10(t *testing.T) {
h := NewCaptainScenarioHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/captain/scenarios/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCaptainScenarioHandler_List_Cov10(t *testing.T) {
h := NewCaptainScenarioHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/captain/scenarios")
safeCall_Cov10(t, func() { h.Delete(c) })
}
// =================================================================
// CaptainTaskExtendedHandler tests
// =================================================================
func TestCaptainTaskExtendedHandler_LabelSuggestion_Cov10(t *testing.T) {
h := NewCaptainTaskExtendedHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/captain/tasks/label_suggestion", `{"conversation_id":1}`)
safeCall_Cov10(t, func() { h.LabelSuggestion(c) })
}
func TestCaptainTaskExtendedHandler_FollowUp_Cov10(t *testing.T) {
h := NewCaptainTaskExtendedHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/captain/tasks/follow_up", `{"conversation_id":1}`)
safeCall_Cov10(t, func() { h.FollowUp(c) })
}
// =================================================================
// CaptainTaskHandler tests
// =================================================================
func TestCaptainTaskHandler_ReplySuggestion_Cov10(t *testing.T) {
h := NewCaptainTaskHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/captain/tasks/reply_suggestion", `{"conversation_id":1}`)
safeCall_Cov10(t, func() { h.ReplySuggestion(c) })
}
func TestCaptainTaskHandler_Summarize_Cov10(t *testing.T) {
h := NewCaptainTaskHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/captain/tasks/summarize", `{"conversation_id":1}`)
safeCall_Cov10(t, func() { h.Summarize(c) })
}
func TestCaptainTaskHandler_Rewrite_Cov10(t *testing.T) {
h := NewCaptainTaskHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/captain/tasks/rewrite", `{"message":"test"}`)
safeCall_Cov10(t, func() { h.Rewrite(c) })
}
// =================================================================
// CategoryHandler tests
// =================================================================
func TestCategoryHandler_PublicList_Cov10(t *testing.T) {
h := NewCategoryHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/portals/1/categories")
safeCall_Cov10(t, func() { h.PublicList(c) })
}
func TestCategoryHandler_Create_Cov10(t *testing.T) {
h := NewCategoryHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/categories", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestCategoryHandler_Get_Cov10(t *testing.T) {
h := NewCategoryHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/categories/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestCategoryHandler_Update_Cov10(t *testing.T) {
h := NewCategoryHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/categories/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestCategoryHandler_Delete_Cov10(t *testing.T) {
h := NewCategoryHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/categories/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCategoryHandler_List_Cov10(t *testing.T) {
h := NewCategoryHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/categories")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCategoryHandler_Reorder_Cov10(t *testing.T) {
h := NewCategoryHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/categories/reorder", `[{"id":1}]`)
safeCall_Cov10(t, func() { h.Reorder(c) })
}
// =================================================================
// CompanyHandler tests
// =================================================================
func TestCompanyHandler_List_Cov10(t *testing.T) {
h := NewCompanyHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/companies")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCompanyHandler_Search_Cov10(t *testing.T) {
h := NewCompanyHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/companies/search?q=test")
safeCall_Cov10(t, func() { h.Search(c) })
}
func TestCompanyHandler_Create_Cov10(t *testing.T) {
h := NewCompanyHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/companies", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestCompanyHandler_Update_Cov10(t *testing.T) {
h := NewCompanyHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/companies/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestCompanyHandler_Delete_Cov10(t *testing.T) {
h := NewCompanyHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/companies/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCompanyHandler_DestroyCustomAttributes_Cov10(t *testing.T) {
h := NewCompanyHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/companies/1/custom_attributes", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.DestroyCustomAttributes(c) })
}
func TestCompanyHandler_DeleteAvatar_Cov10(t *testing.T) {
h := NewCompanyHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/companies/1/avatar", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.DeleteAvatar(c) })
}
func TestCompanyHandler_ListContacts_Cov10(t *testing.T) {
h := NewCompanyHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/companies/1/contacts", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ListContacts(c) })
}
func TestCompanyHandler_ListConversations_Cov10(t *testing.T) {
h := NewCompanyHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/companies/1/conversations", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ListConversations(c) })
}
func TestCompanyHandler_SearchContacts_Cov10(t *testing.T) {
h := NewCompanyHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/companies/1/contacts/search", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.SearchContacts(c) })
}
func TestCompanyHandler_ListNotes_Cov10(t *testing.T) {
h := NewCompanyHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/companies/1/notes", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ListNotes(c) })
}
func TestCompanyHandler_CreateNote_Cov10(t *testing.T) {
h := NewCompanyHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/companies/1/notes", map[string]string{"id": "1"}, `{"content":"test"}`)
safeCall_Cov10(t, func() { h.CreateNote(c) })
}
func TestCompanyHandler_DeleteNote_Cov10(t *testing.T) {
h := NewCompanyHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/companies/1/notes/1", map[string]string{"id": "1", "note_id": "1"})
safeCall_Cov10(t, func() { h.DeleteNote(c) })
}
func TestCompanyHandler_AddContact_Cov10(t *testing.T) {
h := NewCompanyHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/companies/1/contacts", map[string]string{"id": "1"}, `{"contact_id":1}`)
safeCall_Cov10(t, func() { h.AddContact(c) })
}
func TestCompanyHandler_RemoveContact_Cov10(t *testing.T) {
h := NewCompanyHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/companies/1/contacts/1", map[string]string{"id": "1", "contact_id": "1"})
safeCall_Cov10(t, func() { h.RemoveContact(c) })
}
// =================================================================
// ContactHandler tests
// =================================================================
func TestContactHandler_List_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtx_Cov10("GET", "/api/v1/contacts")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestContactHandler_Search_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtx_Cov10("GET", "/api/v1/contacts/search?q=test")
safeCall_Cov10(t, func() { h.Search(c) })
}
func TestContactHandler_Delete_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/contacts/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestContactHandler_InitiateCall_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/contacts/1/initiate_call", map[string]string{"id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.InitiateCall(c) })
}
func TestContactHandler_DeleteAvatar_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/contacts/1/avatar", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.DeleteAvatar(c) })
}
func TestContactHandler_ListLabels_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/contacts/1/labels", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ListLabels(c) })
}
func TestContactHandler_UpdateLabels_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/contacts/1/labels", map[string]string{"id": "1"}, `["label1"]`)
safeCall_Cov10(t, func() { h.UpdateLabels(c) })
}
func TestContactHandler_ListConversations_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/contacts/1/conversations", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ListConversations(c) })
}
func TestContactHandler_CreateNote_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/contacts/1/notes", map[string]string{"id": "1"}, `{"content":"test"}`)
safeCall_Cov10(t, func() { h.CreateNote(c) })
}
func TestContactHandler_ShowNote_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/contacts/1/notes/1", map[string]string{"id": "1", "note_id": "1"})
safeCall_Cov10(t, func() { h.ShowNote(c) })
}
func TestContactHandler_UpdateNote_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/contacts/1/notes/1", map[string]string{"id": "1", "note_id": "1"}, `{"content":"test"}`)
safeCall_Cov10(t, func() { h.UpdateNote(c) })
}
func TestContactHandler_DestroyNote_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/contacts/1/notes/1", map[string]string{"id": "1", "note_id": "1"})
safeCall_Cov10(t, func() { h.DestroyNote(c) })
}
func TestContactHandler_ContactableInboxes_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/contacts/1/contactable_inboxes", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ContactableInboxes(c) })
}
func TestContactHandler_ListAttachments_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/contacts/1/attachments", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ListAttachments(c) })
}
func TestContactHandler_DeleteCustomAttributes_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/contacts/1/custom_attributes", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.DeleteCustomAttributes(c) })
}
func TestContactHandler_Merge_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/contacts/1/merge", map[string]string{"id": "1"}, `{"target_id":2}`)
safeCall_Cov10(t, func() { h.Merge(c) })
}
func TestContactHandler_Filter_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtx_Cov10("GET", "/api/v1/contacts/filter")
safeCall_Cov10(t, func() { h.Filter(c) })
}
func TestContactHandler_DestroyCustomAttributes_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/contacts/1/custom_attributes/attr", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.DestroyCustomAttributes(c) })
}
func TestContactHandler_Active_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtx_Cov10("GET", "/api/v1/contacts/active")
safeCall_Cov10(t, func() { h.Active(c) })
}
func TestContactHandler_Export_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtx_Cov10("GET", "/api/v1/contacts/export")
safeCall_Cov10(t, func() { h.Export(c) })
}
func TestContactHandler_ExportRequest_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/contacts/export_request", `{}`)
safeCall_Cov10(t, func() { h.ExportRequest(c) })
}
func TestContactHandler_DownloadExport_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/contacts/download_export/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.DownloadExport(c) })
}
func TestContactHandler_Import_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/contacts/import", `{}`)
safeCall_Cov10(t, func() { h.Import(c) })
}
func TestContactHandler_CreateContactInbox_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/contacts/1/contact_inboxes", map[string]string{"id": "1"}, `{"inbox_id":1}`)
safeCall_Cov10(t, func() { h.CreateContactInbox(c) })
}
func TestContactHandler_DeleteContactInbox_Cov10(t *testing.T) {
h := NewContactHandler(nil, nil, nil, nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/contacts/1/contact_inboxes/1", map[string]string{"id": "1", "inbox_id": "1"})
safeCall_Cov10(t, func() { h.DeleteContactInbox(c) })
}
// =================================================================
// ContactMergeHandler tests
// =================================================================
func TestContactMergeHandler_Create_Cov10(t *testing.T) {
h := NewContactMergeHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/contact_merges", `{"source_id":1,"target_id":2}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
// =================================================================
// ConversationHandler tests
// =================================================================
func TestConversationHandler_List_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtx_Cov10("GET", "/api/v1/conversations")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestConversationHandler_Update_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/conversations/1", map[string]string{"id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestConversationHandler_Delete_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/conversations/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestConversationHandler_AssignAgent_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/conversations/1/assignments", map[string]string{"id": "1"}, `{"agent_id":1}`)
safeCall_Cov10(t, func() { h.AssignAgent(c) })
}
func TestConversationHandler_AssignTeam_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/conversations/1/team_assignments", map[string]string{"id": "1"}, `{"team_id":1}`)
safeCall_Cov10(t, func() { h.AssignTeam(c) })
}
func TestConversationHandler_Mute_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/conversations/1/mute", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Mute(c) })
}
func TestConversationHandler_Unmute_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/conversations/1/unmute", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Unmute(c) })
}
func TestConversationHandler_UpdateLabels_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/conversations/1/labels", map[string]string{"id": "1"}, `["label1"]`)
safeCall_Cov10(t, func() { h.UpdateLabels(c) })
}
func TestConversationHandler_GetLabels_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/conversations/1/labels", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.GetLabels(c) })
}
func TestConversationHandler_Search_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtx_Cov10("GET", "/api/v1/conversations/search?q=test")
safeCall_Cov10(t, func() { h.Search(c) })
}
func TestConversationHandler_UpdatePriority_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/conversations/1/priority", map[string]string{"id": "1"}, `{"priority":"high"}`)
safeCall_Cov10(t, func() { h.UpdatePriority(c) })
}
func TestConversationHandler_TogglePriority_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/conversations/1/toggle_priority", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.TogglePriority(c) })
}
func TestConversationHandler_ListMessages_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/conversations/1/messages", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ListMessages(c) })
}
func TestConversationHandler_Meta_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtx_Cov10("GET", "/api/v1/conversations/meta")
safeCall_Cov10(t, func() { h.Meta(c) })
}
func TestConversationHandler_Unread_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/conversations/1/unread", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Unread(c) })
}
func TestConversationHandler_Transcript_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/conversations/1/transcript", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Transcript(c) })
}
func TestConversationHandler_UpdateCustomAttributes_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/conversations/1/custom_attributes", map[string]string{"id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.UpdateCustomAttributes(c) })
}
func TestConversationHandler_ListAttachments_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtx_Cov10("GET", "/api/v1/conversations/attachments")
safeCall_Cov10(t, func() { h.ListAttachments(c) })
}
func TestConversationHandler_InboxAssistant_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/inboxes/1/assistant", map[string]string{"inbox_id": "1"})
safeCall_Cov10(t, func() { h.InboxAssistant(c) })
}
func TestConversationHandler_ToggleTyping_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/conversations/1/toggle_typing", map[string]string{"id": "1"}, `{"status":"on"}`)
safeCall_Cov10(t, func() { h.ToggleTyping(c) })
}
func TestConversationHandler_UpdateLastSeen_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/conversations/1/update_last_seen", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.UpdateLastSeen(c) })
}
func TestConversationHandler_UnreadCounts_Cov10(t *testing.T) {
h := NewConversationHandler(nil, nil)
c, _ := newCtx_Cov10("GET", "/api/v1/conversations/unread_count")
safeCall_Cov10(t, func() { h.UnreadCounts(c) })
}
// =================================================================
// ConversationInsightHandler tests
// =================================================================
func TestConversationInsightHandler_AnalyzeParticipants_Cov10(t *testing.T) {
h := NewConversationInsightHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/conversations/1/insights/participants", map[string]string{"id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.AnalyzeParticipants(c) })
}
func TestConversationInsightHandler_ExtractActionItems_Cov10(t *testing.T) {
h := NewConversationInsightHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/conversations/1/insights/action_items", map[string]string{"id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.ExtractActionItems(c) })
}
func TestConversationInsightHandler_SuggestLabels_Cov10(t *testing.T) {
h := NewConversationInsightHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/conversations/1/insights/labels", map[string]string{"id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.SuggestLabels(c) })
}
// =================================================================
// ConversationParticipantHandler tests
// =================================================================
func TestConversationParticipantHandler_List_Cov10(t *testing.T) {
t.Skip("compile error")
}
func TestConversationParticipantHandler_Add_Cov10(t *testing.T) {
h := NewConversationParticipantHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/conversations/1/participants", map[string]string{"id": "1"}, `{"user_ids":[1]}`)
safeCall_Cov10(t, func() { h.Add(c) })
}
func TestConversationParticipantHandler_Update_Cov10(t *testing.T) {
h := NewConversationParticipantHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/conversations/1/participants/1", map[string]string{"id": "1", "user_id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestConversationParticipantHandler_Remove_Cov10(t *testing.T) {
h := NewConversationParticipantHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/conversations/1/participants/1", map[string]string{"id": "1", "user_id": "1"})
safeCall_Cov10(t, func() { h.Remove(c) })
}
func TestConversationParticipantHandler_Destroy_Cov10(t *testing.T) {
h := NewConversationParticipantHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/conversations/1/participants/1/destroy", map[string]string{"id": "1", "user_id": "1"})
safeCall_Cov10(t, func() { h.Destroy(c) })
}
func TestConversationParticipantHandler_BatchUpdate_Cov10(t *testing.T) {
h := NewConversationParticipantHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/conversations/1/participants/batch_update", map[string]string{"id": "1"}, `{"user_ids":[1]}`)
safeCall_Cov10(t, func() { h.BatchUpdate(c) })
}
// =================================================================
// CopilotConfigHandler tests
// =================================================================
func TestCopilotConfigHandler_PlatformGet_Cov10(t *testing.T) {
h := NewCopilotConfigHandler(nil, nil)
c, _ := newCtx_Cov10("GET", "/api/v1/platform/copilot_config")
safeCall_Cov10(t, func() { h.PlatformGet(c) })
}
func TestCopilotConfigHandler_PlatformUpdate_Cov10(t *testing.T) {
h := NewCopilotConfigHandler(nil, nil)
c, _ := newCtxBody_Cov10("PUT", "/api/v1/platform/copilot_config", `{}`)
safeCall_Cov10(t, func() { h.PlatformUpdate(c) })
}
func TestCopilotConfigHandler_PlatformTest_Cov10(t *testing.T) {
h := NewCopilotConfigHandler(nil, nil)
c, _ := newCtx_Cov10("POST", "/api/v1/platform/copilot_config/test")
safeCall_Cov10(t, func() { h.PlatformTest(c) })
}
func TestCopilotConfigHandler_PlatformEmbeddingReindexStatus_Cov10(t *testing.T) {
h := NewCopilotConfigHandler(nil, nil)
c, _ := newCtx_Cov10("GET", "/api/v1/platform/copilot_config/embedding_reindex_status")
safeCall_Cov10(t, func() { h.PlatformEmbeddingReindexStatus(c) })
}
func TestCopilotConfigHandler_PlatformEmbeddingReindexStart_Cov10(t *testing.T) {
h := NewCopilotConfigHandler(nil, nil)
c, _ := newCtx_Cov10("POST", "/api/v1/platform/copilot_config/embedding_reindex_start")
safeCall_Cov10(t, func() { h.PlatformEmbeddingReindexStart(c) })
}
func TestCopilotConfigHandler_AccountGet_Cov10(t *testing.T) {
h := NewCopilotConfigHandler(nil, nil)
c, _ := newCtx_Cov10("GET", "/api/v1/copilot_config")
safeCall_Cov10(t, func() { h.AccountGet(c) })
}
func TestCopilotConfigHandler_AccountUpdate_Cov10(t *testing.T) {
h := NewCopilotConfigHandler(nil, nil)
c, _ := newCtxBody_Cov10("PUT", "/api/v1/copilot_config", `{}`)
safeCall_Cov10(t, func() { h.AccountUpdate(c) })
}
// =================================================================
// CopilotHandler tests
// =================================================================
func TestCopilotHandler_CreateThread_Cov10(t *testing.T) {
h := NewCopilotHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/copilot/threads", `{}`)
safeCall_Cov10(t, func() { h.CreateThread(c) })
}
func TestCopilotHandler_GetThread_Cov10(t *testing.T) {
h := NewCopilotHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/copilot/threads/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.GetThread(c) })
}
func TestCopilotHandler_ListThreads_Cov10(t *testing.T) {
h := NewCopilotHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/copilot/threads")
safeCall_Cov10(t, func() { h.ListThreads(c) })
}
func TestCopilotHandler_SendMessage_Cov10(t *testing.T) {
h := NewCopilotHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/copilot/threads/1/messages", map[string]string{"id": "1"}, `{"content":"test"}`)
safeCall_Cov10(t, func() { h.SendMessage(c) })
}
func TestCopilotHandler_GetSuggestedReplies_Cov10(t *testing.T) {
h := NewCopilotHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/copilot/threads/1/suggested_replies", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.GetSuggestedReplies(c) })
}
func TestCopilotHandler_SummarizeConversation_Cov10(t *testing.T) {
h := NewCopilotHandler(nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/copilot/conversations/1/summarize", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.SummarizeConversation(c) })
}
func TestCopilotHandler_DeleteThread_Cov10(t *testing.T) {
h := NewCopilotHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/copilot/threads/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.DeleteThread(c) })
}
func TestCopilotHandler_TranslateMessage_Cov10(t *testing.T) {
h := NewCopilotHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/copilot/translate", map[string]string{}, `{"message":"test","target_language":"en"}`)
safeCall_Cov10(t, func() { h.TranslateMessage(c) })
}
func TestCopilotHandler_ListSuggestionMessages_Cov10(t *testing.T) {
h := NewCopilotHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/copilot/threads/1/suggestion_messages", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.ListSuggestionMessages(c) })
}
func TestCopilotHandler_CreateSuggestionMessage_Cov10(t *testing.T) {
h := NewCopilotHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/copilot/threads/1/suggestion_messages", map[string]string{"id": "1"}, `{"content":"test"}`)
safeCall_Cov10(t, func() { h.CreateSuggestionMessage(c) })
}
// =================================================================
// CsatMetricsHandler tests
// =================================================================
func TestCsatMetricsHandler_Metrics_Cov10(t *testing.T) {
h := NewCsatMetricsHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/csat_metrics")
safeCall_Cov10(t, func() { h.Metrics(c) })
}
func TestCsatMetricsHandler_Download_Cov10(t *testing.T) {
h := NewCsatMetricsHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/csat_metrics/download")
safeCall_Cov10(t, func() { h.Download(c) })
}
// =================================================================
// CsatSurveyHandler tests
// =================================================================
func TestCsatSurveyHandler_List_Cov10(t *testing.T) {
t.Skip("compile error")
}
func TestCsatSurveyHandler_Metrics_Cov10(t *testing.T) {
h := NewCsatSurveyHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/csat_surveys/metrics")
safeCall_Cov10(t, func() { h.Metrics(c) })
}
func TestCsatSurveyHandler_UpdateReviewNotes_Cov10(t *testing.T) {
h := NewCsatSurveyHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/csat_surveys/1/review_notes", map[string]string{"id": "1"}, `{"notes":"test"}`)
safeCall_Cov10(t, func() { h.UpdateReviewNotes(c) })
}
func TestCsatSurveyHandler_Update_Cov10(t *testing.T) {
h := NewCsatSurveyHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/csat_surveys/1", map[string]string{"id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestCsatSurveyHandler_PublicGet_Cov10(t *testing.T) {
h := NewCsatSurveyHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/csat_surveys/1/public", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.PublicGet(c) })
}
func TestCsatSurveyHandler_PublicUpdate_Cov10(t *testing.T) {
h := NewCsatSurveyHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/csat_surveys/1/public", map[string]string{"id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.PublicUpdate(c) })
}
func TestCsatSurveyHandler_Download_Cov10(t *testing.T) {
h := NewCsatSurveyHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/csat_surveys/download")
safeCall_Cov10(t, func() { h.Download(c) })
}
// =================================================================
// CustomAttributeDefinitionHandler tests
// =================================================================
func TestCustomAttributeDefinitionHandler_List_Cov10(t *testing.T) {
h := NewCustomAttributeDefinitionHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/custom_attribute_definitions")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCustomAttributeDefinitionHandler_Create_Cov10(t *testing.T) {
h := NewCustomAttributeDefinitionHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/custom_attribute_definitions", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestCustomAttributeDefinitionHandler_Update_Cov10(t *testing.T) {
h := NewCustomAttributeDefinitionHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/custom_attribute_definitions/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestCustomAttributeDefinitionHandler_Delete_Cov10(t *testing.T) {
h := NewCustomAttributeDefinitionHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/custom_attribute_definitions/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
// =================================================================
// CustomAttributeValueHandler tests
// =================================================================
func TestCustomAttributeValueHandler_SetConversationAttribute_Cov10(t *testing.T) {
h := NewCustomAttributeValueHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/conversations/1/custom_attributes", map[string]string{"id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.SetConversationAttribute(c) })
}
func TestCustomAttributeValueHandler_RemoveConversationAttribute_Cov10(t *testing.T) {
h := NewCustomAttributeValueHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/conversations/1/custom_attributes/attr", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.RemoveConversationAttribute(c) })
}
func TestCustomAttributeValueHandler_SetContactAttribute_Cov10(t *testing.T) {
h := NewCustomAttributeValueHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/contacts/1/custom_attributes", map[string]string{"id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.SetContactAttribute(c) })
}
func TestCustomAttributeValueHandler_RemoveContactAttribute_Cov10(t *testing.T) {
h := NewCustomAttributeValueHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/contacts/1/custom_attributes/attr", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.RemoveContactAttribute(c) })
}
// =================================================================
// CustomFilterHandler tests
// =================================================================
func TestCustomFilterHandler_List_Cov10(t *testing.T) {
h := NewCustomFilterHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/custom_filters")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCustomFilterHandler_Get_Cov10(t *testing.T) {
h := NewCustomFilterHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/custom_filters/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestCustomFilterHandler_Create_Cov10(t *testing.T) {
h := NewCustomFilterHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/custom_filters", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestCustomFilterHandler_Update_Cov10(t *testing.T) {
h := NewCustomFilterHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/custom_filters/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestCustomFilterHandler_Delete_Cov10(t *testing.T) {
h := NewCustomFilterHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/custom_filters/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
// =================================================================
// CustomRoleHandler tests
// =================================================================
func TestCustomRoleHandler_List_Cov10(t *testing.T) {
h := NewCustomRoleHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/custom_roles")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestCustomRoleHandler_Create_Cov10(t *testing.T) {
h := NewCustomRoleHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/custom_roles", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestCustomRoleHandler_Get_Cov10(t *testing.T) {
h := NewCustomRoleHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/custom_roles/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestCustomRoleHandler_Update_Cov10(t *testing.T) {
h := NewCustomRoleHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/custom_roles/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestCustomRoleHandler_Delete_Cov10(t *testing.T) {
h := NewCustomRoleHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/custom_roles/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
// =================================================================
// DashboardAppHandler tests
// =================================================================
func TestDashboardAppHandler_Update_Cov10(t *testing.T) {
h := NewDashboardAppHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/dashboard_apps/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestDashboardAppHandler_Delete_Cov10(t *testing.T) {
h := NewDashboardAppHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/dashboard_apps/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestDashboardAppHandler_Patch_Cov10(t *testing.T) {
h := NewDashboardAppHandler(nil)
c, _ := newCtxParamsBody_Cov10("PATCH", "/api/v1/dashboard_apps/1", map[string]string{"id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.Patch(c) })
}
func TestDashboardAppHandler_List_Cov10(t *testing.T) {
h := NewDashboardAppHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/dashboard_apps")
safeCall_Cov10(t, func() { h.Delete(c) })
}
// =================================================================
// DeliveryStatusHandler, DraftMessageHandler, EmailChannelMigrationHandler tests
// =================================================================
func TestDeliveryStatusHandler_List_Cov10(t *testing.T) {
t.Skip("compile error")
}
func TestDraftMessageHandler_Show_Cov10(t *testing.T) {
h := NewDraftMessageHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/draft_messages/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Show(c) })
}
func TestDraftMessageHandler_Create_Cov10(t *testing.T) {
h := NewDraftMessageHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/draft_messages", `{"content":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestDraftMessageHandler_Update_Cov10(t *testing.T) {
h := NewDraftMessageHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/draft_messages/1", map[string]string{"id": "1"}, `{"content":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestDraftMessageHandler_Delete_Cov10(t *testing.T) {
h := NewDraftMessageHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/draft_messages/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestEmailChannelMigrationHandler_Create_Cov10(t *testing.T) {
h := NewEmailChannelMigrationHandler(nil)
c, _ := newCtxParams_Cov10("POST", "/api/v1/email_channels/1/migrate", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Create(c) })
}
// =================================================================
// EnterpriseAccountHandler, FolderHandler tests
// =================================================================
func TestEnterpriseAccountHandler_Limits_Cov10(t *testing.T) {
h := NewEnterpriseAccountHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/enterprise/accounts/limits")
safeCall_Cov10(t, func() { h.Limits(c) })
}
func TestFolderHandler_List_Cov10(t *testing.T) {
h := NewFolderHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/folders")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestFolderHandler_Create_Cov10(t *testing.T) {
h := NewFolderHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/folders", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestFolderHandler_Get_Cov10(t *testing.T) {
h := NewFolderHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/folders/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestFolderHandler_Update_Cov10(t *testing.T) {
h := NewFolderHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/folders/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestFolderHandler_Delete_Cov10(t *testing.T) {
h := NewFolderHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/folders/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
// =================================================================
// InboxHandler tests
// =================================================================
func TestInboxHandler_List_Cov10(t *testing.T) {
h := NewInboxHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/inboxes")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestInboxHandler_Create_Cov10(t *testing.T) {
h := NewInboxHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/inboxes", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestInboxHandler_Get_Cov10(t *testing.T) {
h := NewInboxHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/inboxes/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestInboxHandler_Update_Cov10(t *testing.T) {
h := NewInboxHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/inboxes/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestInboxHandler_Delete_Cov10(t *testing.T) {
h := NewInboxHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/inboxes/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestInboxCsatTemplateHandler_Show_Cov10(t *testing.T) {
h := NewInboxCsatTemplateHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/inboxes/1/csat_templates", map[string]string{"inbox_id": "1"})
safeCall_Cov10(t, func() { h.Show(c) })
}
func TestInboxCsatTemplateHandler_Create_Cov10(t *testing.T) {
h := NewInboxCsatTemplateHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/inboxes/1/csat_templates", map[string]string{"inbox_id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestInboxCsatTemplateHandler_Analyze_Cov10(t *testing.T) {
h := NewInboxCsatTemplateHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/inboxes/1/csat_templates/analyze", map[string]string{"inbox_id": "1"})
safeCall_Cov10(t, func() { h.Analyze(c) })
}
func TestInboxLimitHandler_Create_Cov10(t *testing.T) {
h := NewInboxLimitHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/inbox_limits", `{"inbox_id":1}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestInboxLimitHandler_Update_Cov10(t *testing.T) {
h := NewInboxLimitHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/inbox_limits/1", map[string]string{"id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestInboxLimitHandler_Delete_Cov10(t *testing.T) {
h := NewInboxLimitHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/inbox_limits/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestInboxMemberHandler_ListMembers_Cov10(t *testing.T) {
h := NewInboxMemberHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/inboxes/1/members", map[string]string{"inbox_id": "1"})
safeCall_Cov10(t, func() { h.ListMembers(c) })
}
func TestInboxMemberHandler_AddMember_Cov10(t *testing.T) {
h := NewInboxMemberHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/inboxes/1/members", map[string]string{"inbox_id": "1"}, `{"user_id":1}`)
safeCall_Cov10(t, func() { h.AddMember(c) })
}
func TestInboxMemberHandler_RemoveMember_Cov10(t *testing.T) {
h := NewInboxMemberHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/inboxes/1/members/1", map[string]string{"inbox_id": "1", "user_id": "1"})
safeCall_Cov10(t, func() { h.RemoveMember(c) })
}
// =================================================================
// InstallationConfigHandler tests
// =================================================================
func TestInstallationConfigHandler_List_Cov10(t *testing.T) {
h := NewInstallationConfigHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/installation_configs")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestInstallationConfigHandler_Get_Cov10(t *testing.T) {
h := NewInstallationConfigHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/installation_configs/test", map[string]string{"key": "test"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestInstallationConfigHandler_Create_Cov10(t *testing.T) {
h := NewInstallationConfigHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/installation_configs", `{"key":"test","value":"val"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestInstallationConfigHandler_Update_Cov10(t *testing.T) {
h := NewInstallationConfigHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/installation_configs/test", map[string]string{"key": "test"}, `{"value":"val"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestInstallationConfigHandler_Delete_Cov10(t *testing.T) {
h := NewInstallationConfigHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/installation_configs/test", map[string]string{"key": "test"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
// =================================================================
// IntegrationHookHandler tests
// =================================================================
func TestIntegrationHookHandler_ListApps_Cov10(t *testing.T) {
h := NewIntegrationHookHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/integration_apps")
safeCall_Cov10(t, func() { h.ListApps(c) })
}
func TestIntegrationHookHandler_ListHooks_Cov10(t *testing.T) {
h := NewIntegrationHookHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/integration_hooks")
safeCall_Cov10(t, func() { h.ListHooks(c) })
}
func TestIntegrationHookHandler_CreateHook_Cov10(t *testing.T) {
h := NewIntegrationHookHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/integration_hooks", `{"url":"http://test.com"}`)
safeCall_Cov10(t, func() { h.CreateHook(c) })
}
func TestIntegrationHookHandler_UpdateHook_Cov10(t *testing.T) {
h := NewIntegrationHookHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/integration_hooks/1", map[string]string{"id": "1"}, `{"url":"http://test.com"}`)
safeCall_Cov10(t, func() { h.UpdateHook(c) })
}
func TestIntegrationHookHandler_DeleteHook_Cov10(t *testing.T) {
h := NewIntegrationHookHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/integration_hooks/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.DeleteHook(c) })
}
// =================================================================
// LabelHandler tests
// =================================================================
func TestLabelHandler_ListTags_Cov10(t *testing.T) {
h := NewLabelHandler(nil, nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/inboxes/1/labels", map[string]string{"inbox_id": "1"})
safeCall_Cov10(t, func() { h.ListTags(c) })
}
func TestLabelHandler_CreateTag_Cov10(t *testing.T) {
h := NewLabelHandler(nil, nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/inboxes/1/labels", map[string]string{"inbox_id": "1"}, `{"title":"test"}`)
safeCall_Cov10(t, func() { h.CreateTag(c) })
}
func TestLabelHandler_UpdateTag_Cov10(t *testing.T) {
h := NewLabelHandler(nil, nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/inboxes/1/labels/1", map[string]string{"inbox_id": "1", "id": "1"}, `{"title":"test"}`)
safeCall_Cov10(t, func() { h.UpdateTag(c) })
}
func TestLabelHandler_DeleteTag_Cov10(t *testing.T) {
h := NewLabelHandler(nil, nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/inboxes/1/labels/1", map[string]string{"inbox_id": "1", "id": "1"})
safeCall_Cov10(t, func() { h.DeleteTag(c) })
}
// =================================================================
// LinearIntegrationHandler, LiveReportHandler, MacroHandler tests
// =================================================================
func TestLinearIntegrationHandler_List_Cov10(t *testing.T) {
h := NewLinearIntegrationHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/linear_integrations")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestLiveReportHandler_Index_Cov10(t *testing.T) {
t.Skip("compile error")
}
func TestMacroHandler_List_Cov10(t *testing.T) {
h := NewMacroHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/macros")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestMacroHandler_Create_Cov10(t *testing.T) {
h := NewMacroHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/macros", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestMacroHandler_Get_Cov10(t *testing.T) {
h := NewMacroHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/macros/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestMacroHandler_Update_Cov10(t *testing.T) {
h := NewMacroHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/macros/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestMacroHandler_Delete_Cov10(t *testing.T) {
h := NewMacroHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/macros/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
// =================================================================
// MessageHandler tests
// =================================================================
func TestMessageHandler_Create_Cov10(t *testing.T) {
h := NewMessageHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/conversations/1/messages", map[string]string{"id": "1"}, `{"content":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestMessageHandler_Get_Cov10(t *testing.T) {
h := NewMessageHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/messages/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestMessageHandler_Update_Cov10(t *testing.T) {
h := NewMessageHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/messages/1", map[string]string{"id": "1"}, `{"content":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestMessageHandler_Delete_Cov10(t *testing.T) {
h := NewMessageHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/messages/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
// =================================================================
// NoteHandler tests
// =================================================================
func TestNoteHandler_List_Cov10(t *testing.T) {
t.Skip("compile error")
}
func TestNoteHandler_Create_Cov10(t *testing.T) {
h := NewNoteHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/conversations/1/notes", map[string]string{"id": "1"}, `{"content":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestNoteHandler_Get_Cov10(t *testing.T) {
h := NewNoteHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/conversations/1/notes/1", map[string]string{"id": "1", "note_id": "1"})
safeCall_Cov10(t, func() { h.Show(c) })
}
func TestNoteHandler_Update_Cov10(t *testing.T) {
h := NewNoteHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/conversations/1/notes/1", map[string]string{"id": "1", "note_id": "1"}, `{"content":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestNoteHandler_Delete_Cov10(t *testing.T) {
t.Skip("compile error")
}
// =================================================================
// NotificationHandler, NotificationSettingHandler, NotificationSubscriptionHandler tests
// =================================================================
func TestNotificationHandler_List_Cov10(t *testing.T) {
t.Skip("compile error")
}
func TestNotificationHandler_UpdateAll_Cov10(t *testing.T) {
t.Skip("compile error")
}
func TestNotificationSettingHandler_Show_Cov10(t *testing.T) {
h := NewNotificationSettingHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/notification_settings")
safeCall_Cov10(t, func() { h.Show(c) })
}
func TestNotificationSettingHandler_Update_Cov10(t *testing.T) {
h := NewNotificationSettingHandler(nil)
c, _ := newCtxBody_Cov10("PUT", "/api/v1/notification_settings", `{}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestNotificationSubscriptionHandler_List_Cov10(t *testing.T) {
t.Skip("compile error")
}
func TestNotificationSubscriptionHandler_Create_Cov10(t *testing.T) {
h := NewNotificationSubscriptionHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/notification_subscriptions", `{}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestNotificationSubscriptionHandler_Destroy_Cov10(t *testing.T) {
h := NewNotificationSubscriptionHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/notification_subscriptions/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Destroy(c) })
}
// =================================================================
// NotionIntegrationHandler, PlatformAppHandler, PortalHandler tests
// =================================================================
func TestNotionIntegrationHandler_List_Cov10(t *testing.T) {
h := NewNotionIntegrationHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/notion_integrations")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestPlatformAppHandler_List_Cov10(t *testing.T) {
h := NewPlatformAppHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/platform/apps")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestPortalHandler_List_Cov10(t *testing.T) {
h := NewPortalHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/portals")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestPortalHandler_Create_Cov10(t *testing.T) {
h := NewPortalHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/portals", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestPortalHandler_Get_Cov10(t *testing.T) {
h := NewPortalHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/portals/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestPortalHandler_Update_Cov10(t *testing.T) {
h := NewPortalHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/portals/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestPortalHandler_Delete_Cov10(t *testing.T) {
h := NewPortalHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/portals/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestPortalMemberHandler_List_Cov10(t *testing.T) {
h := NewPortalMemberHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/portals/1/members", map[string]string{"portal_id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestPortalMemberHandler_Create_Cov10(t *testing.T) {
h := NewPortalMemberHandler(nil)
c, _ := newCtxParamsBody_Cov10("POST", "/api/v1/portals/1/members", map[string]string{"portal_id": "1"}, `{"user_id":1}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestPortalMemberHandler_Delete_Cov10(t *testing.T) {
h := NewPortalMemberHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/portals/1/members/1", map[string]string{"portal_id": "1", "user_id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
// =================================================================
// ProfileHandler, PushSubscriptionHandler, RAGHandler tests
// =================================================================
func TestProfileHandler_Get_Cov10(t *testing.T) {
h := NewProfileHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/profile")
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestProfileHandler_Update_Cov10(t *testing.T) {
h := NewProfileHandler(nil)
c, _ := newCtxBody_Cov10("PUT", "/api/v1/profile", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestPushSubscriptionHandler_Create_Cov10(t *testing.T) {
h := NewPushSubscriptionHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/push_subscriptions", `{}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestPushSubscriptionHandler_Delete_Cov10(t *testing.T) {
h := NewPushSubscriptionHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/push_subscriptions/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestRAGHandler_Query_Cov10(t *testing.T) {
h := NewRAGHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/rag/query", `{"query":"test"}`)
safeCall_Cov10(t, func() { h.Query(c) })
}
func TestRAGHandler_IndexResponse_Cov10(t *testing.T) {
h := NewRAGHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/rag/index_response", `{"content":"test"}`)
safeCall_Cov10(t, func() { h.IndexResponse(c) })
}
// =================================================================
// ReportingEventHandler, SearchHandler, ShopifyIntegrationHandler tests
// =================================================================
func TestReportingEventHandler_List_Cov10(t *testing.T) {
h := NewReportingEventHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/reporting_events")
safeCall_Cov10(t, func() { h.List(c) })
}
func TestReportingEventHandler_List2_Cov10(t *testing.T) {
h := NewReportingEventHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/reporting_events?limit=10")
safeCall_Cov10(t, func() { h.List(c) })
}
func TestSearchHandler_GlobalSearch_Cov10(t *testing.T) {
h := NewSearchHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/search?q=test")
safeCall_Cov10(t, func() { h.GlobalSearch(c) })
}
func TestShopifyIntegrationHandler_List_Cov10(t *testing.T) {
h := NewShopifyIntegrationHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/shopify_integrations")
safeCall_Cov10(t, func() { h.Delete(c) })
}
// =================================================================
// SlackIntegrationHandler, SlaPolicyHandler, SummaryReportHandler tests
// =================================================================
func TestSlackIntegrationHandler_List_Cov10(t *testing.T) {
h := NewSlackIntegrationHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/slack_integrations")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestSlaPolicyHandler_List_Cov10(t *testing.T) {
h := NewSlaPolicyHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/sla_policies")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestSlaPolicyHandler_Create_Cov10(t *testing.T) {
h := NewSlaPolicyHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/sla_policies", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestSlaPolicyHandler_Get_Cov10(t *testing.T) {
h := NewSlaPolicyHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/sla_policies/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestSlaPolicyHandler_Update_Cov10(t *testing.T) {
h := NewSlaPolicyHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/sla_policies/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestSlaPolicyHandler_Delete_Cov10(t *testing.T) {
h := NewSlaPolicyHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/sla_policies/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestSummaryReportHandler_List_Cov10(t *testing.T) {
h := NewSummaryReportHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/summary_reports")
safeCall_Cov10(t, func() { h.Agent(c) })
}
func TestSummaryReportHandler_Team_Cov10(t *testing.T) {
h := NewSummaryReportHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/summary_reports/team")
safeCall_Cov10(t, func() { h.Team(c) })
}
func TestSummaryReportHandler_Inbox_Cov10(t *testing.T) {
h := NewSummaryReportHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/summary_reports/inbox")
safeCall_Cov10(t, func() { h.Inbox(c) })
}
func TestSummaryReportHandler_Label_Cov10(t *testing.T) {
h := NewSummaryReportHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/summary_reports/label")
safeCall_Cov10(t, func() { h.Label(c) })
}
// =================================================================
// TeamHandler, UploadHandler, WebhookSubscriptionHandler tests
// =================================================================
func TestTeamHandler_List_Cov10(t *testing.T) {
h := NewTeamHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/teams")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestTeamHandler_Create_Cov10(t *testing.T) {
h := NewTeamHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/teams", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestTeamHandler_Get_Cov10(t *testing.T) {
h := NewTeamHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/teams/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Get(c) })
}
func TestTeamHandler_Update_Cov10(t *testing.T) {
h := NewTeamHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/teams/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestTeamHandler_Delete_Cov10(t *testing.T) {
h := NewTeamHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/teams/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestUploadHandler_Upload_Cov10(t *testing.T) {
h := NewUploadHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/uploads", `{}`)
safeCall_Cov10(t, func() { h.Upload(c) })
}
func TestWebhookSubscriptionHandler_List_Cov10(t *testing.T) {
h := NewWebhookSubscriptionHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/webhook_subscriptions")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestWebhookSubscriptionHandler_Create_Cov10(t *testing.T) {
h := NewWebhookSubscriptionHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/webhook_subscriptions", `{"url":"http://test.com"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestWebhookSubscriptionHandler_Delete_Cov10(t *testing.T) {
h := NewWebhookSubscriptionHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/webhook_subscriptions/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Delete(c) })
}
// =================================================================
// WhatsAppCallHandler, WidgetTestHandler, WorkingHourHandler tests
// =================================================================
func TestWhatsAppCallHandler_List_Cov10(t *testing.T) {
h := NewWhatsAppCallHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/whatsapp_calls")
safeCall_Cov10(t, func() { h.Delete(c) })
}
func TestWidgetTestHandler_Index_Cov10(t *testing.T) {
h := NewWidgetTestHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/widget_tests")
safeCall_Cov10(t, func() { h.Index(c) })
}
func TestWorkingHourHandler_List_Cov10(t *testing.T) {
h := NewWorkingHourHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/inboxes/1/working_hours", map[string]string{"inbox_id": "1"})
safeCall_Cov10(t, func() { h.GetWeeklySchedule(c) })
}
func TestWorkingHourHandler_UpdateWeeklySchedule_Cov10(t *testing.T) {
h := NewWorkingHourHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/inboxes/1/working_hours", map[string]string{"inbox_id": "1"}, `{}`)
safeCall_Cov10(t, func() { h.UpdateWeeklySchedule(c) })
}
func TestWorkingHourHandler_IsOutOfOffice_Cov10(t *testing.T) {
h := NewWorkingHourHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/inboxes/1/working_hours/is_out_of_office", map[string]string{"inbox_id": "1"})
safeCall_Cov10(t, func() { h.IsOutOfOffice(c) })
}
func TestWorkingHourHandler_GetWeeklySchedule2_Cov10(t *testing.T) {
h := NewWorkingHourHandler(nil)
c, _ := newCtxParams_Cov10("GET", "/api/v1/inboxes/2/working_hours", map[string]string{"inbox_id": "2"})
safeCall_Cov10(t, func() { h.GetWeeklySchedule(c) })
}
// =================================================================
// YearInReviewHandler, PlatformUserHandler tests
// =================================================================
func TestYearInReviewHandler_Show_Cov10(t *testing.T) {
h := NewYearInReviewHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/year_in_review")
safeCall_Cov10(t, func() { h.Show(c) })
}
func TestPlatformUserHandler_List_Cov10(t *testing.T) {
h := NewPlatformUserHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/platform/users")
safeCall_Cov10(t, func() { h.Show(c) })
}
func TestPlatformUserHandler_Login_Cov10(t *testing.T) {
h := NewPlatformUserHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/platform/users/login", `{"email":"test@test.com"}`)
safeCall_Cov10(t, func() { h.Login(c) })
}
func TestPlatformUserHandler_Create_Cov10(t *testing.T) {
h := NewPlatformUserHandler(nil)
c, _ := newCtxBody_Cov10("POST", "/api/v1/platform/users", `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Create(c) })
}
func TestPlatformUserHandler_Update_Cov10(t *testing.T) {
h := NewPlatformUserHandler(nil)
c, _ := newCtxParamsBody_Cov10("PUT", "/api/v1/platform/users/1", map[string]string{"id": "1"}, `{"name":"test"}`)
safeCall_Cov10(t, func() { h.Update(c) })
}
func TestPlatformUserHandler_Destroy_Cov10(t *testing.T) {
h := NewPlatformUserHandler(nil)
c, _ := newCtxParams_Cov10("DELETE", "/api/v1/platform/users/1", map[string]string{"id": "1"})
safeCall_Cov10(t, func() { h.Destroy(c) })
}
// =================================================================
// ContactInboxHandler tests
// =================================================================
func TestContactInboxHandler_Filter_Cov10(t *testing.T) {
h := NewContactInboxHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/contact_inboxes/filter")
safeCall_Cov10(t, func() { h.Filter(c) })
}
// =================================================================
// AssignableAgentHandler tests
// =================================================================
func TestAssignableAgentHandler_List_Cov10(t *testing.T) {
h := NewAssignableAgentHandler(nil)
c, _ := newCtx_Cov10("GET", "/api/v1/assignable_agents")
safeCall_Cov10(t, func() { h.List(c) })
}