package v1 import ( "net/http/httptest" "strings" "testing" "github.com/gin-gonic/gin" "github.com/stretchr/testify/assert" ) // coverage5_test.go targets 0% files to boost coverage for internal/handler/api/v1. // All tests use nil services; handlers that panic are caught with recover+skip. func init() { gin.SetMode(gin.TestMode) } func safeCall_Cov5(t *testing.T, name string, f func()) { t.Helper() defer func() { if r := recover(); r != nil { t.Skipf("%s panicked with nil service: %v", name, r) } }() f() } func newCtx_Cov5(method, url string, body string) (*gin.Context, *httptest.ResponseRecorder) { w := httptest.NewRecorder() c, _ := gin.CreateTestContext(w) if body != "" { c.Request = httptest.NewRequest(method, url, strings.NewReader(body)) c.Request.Header.Set("Content-Type", "application/json") } else { c.Request = httptest.NewRequest(method, url, nil) } return c, w } // ===== SearchHandler ===== func TestNewSearchHandler_Cov5(t *testing.T) { h := NewSearchHandler(nil) assert.NotNil(t, h) } func TestSearchHandler_GlobalSearch_Cov5(t *testing.T) { h := NewSearchHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "GlobalSearch", func() { h.GlobalSearch(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestSearchHandler_SearchConversations_Cov5(t *testing.T) { h := NewSearchHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "SearchConversations", func() { h.SearchConversations(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestSearchHandler_SearchMessages_Cov5(t *testing.T) { h := NewSearchHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "SearchMessages", func() { h.SearchMessages(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestSearchHandler_SearchContacts_Cov5(t *testing.T) { h := NewSearchHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "SearchContacts", func() { h.SearchContacts(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestSearchHandler_SearchArticles_Cov5(t *testing.T) { h := NewSearchHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "SearchArticles", func() { h.SearchArticles(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== InboxHandler ===== func TestNewInboxHandler_Cov5(t *testing.T) { h := NewInboxHandler(nil) assert.NotNil(t, h) } func TestInboxHandler_WithAuditService_Cov5(t *testing.T) { h := NewInboxHandler(nil) result := h.WithAuditService(nil) assert.NotNil(t, result) } func TestInboxHandler_List_Cov5(t *testing.T) { h := NewInboxHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestInboxHandler_Get_Cov5(t *testing.T) { h := NewInboxHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Get", func() { h.Get(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestInboxHandler_Create_Cov5(t *testing.T) { h := NewInboxHandler(nil) c, w := newCtx_Cov5("POST", "/", `{"name":"test"}`) safeCall_Cov5(t, "Create", func() { h.Create(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestInboxHandler_Health_Cov5(t *testing.T) { h := NewInboxHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Health", func() { h.Health(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== FacebookChannelHandler ===== func TestNewFacebookChannelHandler_Cov5(t *testing.T) { h := NewFacebookChannelHandler(nil, nil, nil, nil) assert.NotNil(t, h) } func TestFacebookChannelHandler_Authorization_Cov5(t *testing.T) { h := NewFacebookChannelHandler(nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Authorization", func() { h.Authorization(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestFacebookChannelHandler_FacebookPages_Cov5(t *testing.T) { h := NewFacebookChannelHandler(nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "FacebookPages", func() { h.FacebookPages(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestFacebookChannelHandler_ListFacebookChannels_Cov5(t *testing.T) { h := NewFacebookChannelHandler(nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "ListFacebookChannels", func() { h.ListFacebookChannels(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestFacebookChannelHandler_OAuthCallback_Cov5(t *testing.T) { h := NewFacebookChannelHandler(nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/?code=test&state=test", "") safeCall_Cov5(t, "OAuthCallback", func() { h.OAuthCallback(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== AgentBotHandler ===== func TestNewAgentBotHandler_Cov5(t *testing.T) { h := NewAgentBotHandler(nil) assert.NotNil(t, h) } func TestAgentBotHandler_List_Cov5(t *testing.T) { h := NewAgentBotHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestAgentBotHandler_Get_Cov5(t *testing.T) { h := NewAgentBotHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Get", func() { h.Get(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestAgentBotHandler_ListAccessible_Cov5(t *testing.T) { h := NewAgentBotHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "ListAccessible", func() { h.ListAccessible(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestAgentBotHandler_ResetToken_Cov5(t *testing.T) { h := NewAgentBotHandler(nil) c, w := newCtx_Cov5("POST", "/", "") safeCall_Cov5(t, "ResetToken", func() { h.ResetToken(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestAgentBotHandler_ResetSecret_Cov5(t *testing.T) { h := NewAgentBotHandler(nil) c, w := newCtx_Cov5("POST", "/", "") safeCall_Cov5(t, "ResetSecret", func() { h.ResetSecret(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== WhatsAppCallHandler ===== func TestNewWhatsAppCallHandler_Cov5(t *testing.T) { h := NewWhatsAppCallHandler(nil) assert.NotNil(t, h) } func TestWhatsAppCallHandler_Index_Cov5(t *testing.T) { h := NewWhatsAppCallHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Index", func() { h.Index(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestWhatsAppCallHandler_Show_Cov5(t *testing.T) { h := NewWhatsAppCallHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Show", func() { h.Show(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestWhatsAppCallHandler_Get_Cov5(t *testing.T) { h := NewWhatsAppCallHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Get", func() { h.Get(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestWhatsAppCallHandler_List_Cov5(t *testing.T) { h := NewWhatsAppCallHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== ContactHandler ===== func TestNewContactHandler_Cov5(t *testing.T) { h := NewContactHandler(nil, nil, nil, nil) assert.NotNil(t, h) } func TestContactHandler_WithEventPublisher_Cov5(t *testing.T) { h := NewContactHandler(nil, nil, nil, nil) result := h.WithEventPublisher(nil) assert.NotNil(t, result) } func TestContactHandler_WithContactPresence_Cov5(t *testing.T) { h := NewContactHandler(nil, nil, nil, nil) result := h.WithContactPresence(nil) assert.NotNil(t, result) } func TestContactHandler_List_Cov5(t *testing.T) { h := NewContactHandler(nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestContactHandler_Search_Cov5(t *testing.T) { h := NewContactHandler(nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Search", func() { h.Search(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== AssignmentPolicyHandler ===== func TestNewAssignmentPolicyHandler_Cov5(t *testing.T) { h := NewAssignmentPolicyHandler(nil) assert.NotNil(t, h) } func TestAssignmentPolicyHandler_ListAccountPolicies_Cov5(t *testing.T) { h := NewAssignmentPolicyHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "ListAccountPolicies", func() { h.ListAccountPolicies(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestAssignmentPolicyHandler_GetAccountPolicy_Cov5(t *testing.T) { h := NewAssignmentPolicyHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "GetAccountPolicy", func() { h.GetAccountPolicy(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestAssignmentPolicyHandler_GetInboxPolicy_Cov5(t *testing.T) { h := NewAssignmentPolicyHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "GetInboxPolicy", func() { h.GetInboxPolicy(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestAssignmentPolicyHandler_ListPolicyInboxes_Cov5(t *testing.T) { h := NewAssignmentPolicyHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "ListPolicyInboxes", func() { h.ListPolicyInboxes(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== WebWidgetThemeHandler ===== func TestNewWebWidgetThemeHandler_Cov5(t *testing.T) { h := NewWebWidgetThemeHandler(nil, nil) assert.NotNil(t, h) } func TestWebWidgetThemeHandler_GetThemeConfig_Cov5(t *testing.T) { h := NewWebWidgetThemeHandler(nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "GetThemeConfig", func() { h.GetThemeConfig(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestWebWidgetThemeHandler_UpdateThemeConfig_Cov5(t *testing.T) { h := NewWebWidgetThemeHandler(nil, nil) c, w := newCtx_Cov5("POST", "/", `{"theme":"dark"}`) safeCall_Cov5(t, "UpdateThemeConfig", func() { h.UpdateThemeConfig(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestWebWidgetThemeHandler_DeleteThemeConfig_Cov5(t *testing.T) { h := NewWebWidgetThemeHandler(nil, nil) c, w := newCtx_Cov5("DELETE", "/", "") safeCall_Cov5(t, "DeleteThemeConfig", func() { h.DeleteThemeConfig(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== WebWidgetHandler ===== func TestNewWebWidgetHandler_Cov5(t *testing.T) { h := NewWebWidgetHandler(nil) assert.NotNil(t, h) } func TestWebWidgetHandler_GetWebWidgetConfig_Cov5(t *testing.T) { h := NewWebWidgetHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "GetWebWidgetConfig", func() { h.GetWebWidgetConfig(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestWebWidgetHandler_CreateWebWidgetInbox_Cov5(t *testing.T) { h := NewWebWidgetHandler(nil) c, w := newCtx_Cov5("POST", "/", `{"name":"test"}`) safeCall_Cov5(t, "CreateWebWidgetInbox", func() { h.CreateWebWidgetInbox(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== TwitterChannelHandler ===== func TestNewTwitterChannelHandler_Cov5(t *testing.T) { h := NewTwitterChannelHandler(nil, nil, nil, nil) assert.NotNil(t, h) } func TestTwitterChannelHandler_Authorization_Cov5(t *testing.T) { h := NewTwitterChannelHandler(nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Authorization", func() { h.Authorization(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestTwitterChannelHandler_ChatwootAuthorization_Cov5(t *testing.T) { h := NewTwitterChannelHandler(nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "ChatwootAuthorization", func() { h.ChatwootAuthorization(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestTwitterChannelHandler_OAuthCallbackGET_Cov5(t *testing.T) { h := NewTwitterChannelHandler(nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/?code=test&state=test", "") safeCall_Cov5(t, "OAuthCallbackGET", func() { h.OAuthCallbackGET(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== MicrosoftChannelHandler ===== func TestNewMicrosoftChannelHandler_Cov5(t *testing.T) { h := NewMicrosoftChannelHandler(nil, nil, nil, nil) assert.NotNil(t, h) } func TestMicrosoftChannelHandler_Authorization_Cov5(t *testing.T) { h := NewMicrosoftChannelHandler(nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Authorization", func() { h.Authorization(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestMicrosoftChannelHandler_ChatwootAuthorization_Cov5(t *testing.T) { h := NewMicrosoftChannelHandler(nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "ChatwootAuthorization", func() { h.ChatwootAuthorization(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestMicrosoftChannelHandler_WebhookValidation_Cov5(t *testing.T) { h := NewMicrosoftChannelHandler(nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/?validationToken=test", "") safeCall_Cov5(t, "WebhookValidation", func() { h.WebhookValidation(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== GoogleChannelHandler ===== func TestNewGoogleChannelHandler_Cov5(t *testing.T) { h := NewGoogleChannelHandler(nil, nil, nil, nil) assert.NotNil(t, h) } func TestGoogleChannelHandler_Authorization_Cov5(t *testing.T) { h := NewGoogleChannelHandler(nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Authorization", func() { h.Authorization(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestGoogleChannelHandler_ChatwootAuthorization_Cov5(t *testing.T) { h := NewGoogleChannelHandler(nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "ChatwootAuthorization", func() { h.ChatwootAuthorization(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestGoogleChannelHandler_OAuthCallbackGET_Cov5(t *testing.T) { h := NewGoogleChannelHandler(nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/?code=test&state=test", "") safeCall_Cov5(t, "OAuthCallbackGET", func() { h.OAuthCallbackGET(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== CopilotHandler ===== func TestNewCopilotHandler_Cov5(t *testing.T) { h := NewCopilotHandler(nil) assert.NotNil(t, h) } func TestCopilotHandler_ListThreads_Cov5(t *testing.T) { h := NewCopilotHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "ListThreads", func() { h.ListThreads(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestCopilotHandler_GetSuggestedReplies_Cov5(t *testing.T) { h := NewCopilotHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "GetSuggestedReplies", func() { h.GetSuggestedReplies(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestCopilotHandler_SummarizeConversation_Cov5(t *testing.T) { h := NewCopilotHandler(nil) c, w := newCtx_Cov5("POST", "/", "") safeCall_Cov5(t, "SummarizeConversation", func() { h.SummarizeConversation(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== AuthHandler ===== func TestNewAuthHandler_Cov5(t *testing.T) { h := NewAuthHandler(nil) assert.NotNil(t, h) } func TestAuthHandler_Login_Cov5(t *testing.T) { h := NewAuthHandler(nil) c, w := newCtx_Cov5("POST", "/", `{"email":"test@test.com","password":"pass"}`) safeCall_Cov5(t, "Login", func() { h.Login(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestAuthHandler_Logout_Cov5(t *testing.T) { h := NewAuthHandler(nil) c, w := newCtx_Cov5("DELETE", "/", "") safeCall_Cov5(t, "Logout", func() { h.Logout(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestAuthHandler_Refresh_Cov5(t *testing.T) { h := NewAuthHandler(nil) c, w := newCtx_Cov5("POST", "/", "") safeCall_Cov5(t, "Refresh", func() { h.Refresh(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== TeamHandler ===== func TestNewTeamHandler_Cov5(t *testing.T) { h := NewTeamHandler(nil) assert.NotNil(t, h) } func TestTeamHandler_List_Cov5(t *testing.T) { h := NewTeamHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestTeamHandler_Get_Cov5(t *testing.T) { h := NewTeamHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Get", func() { h.Get(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== SSOSessionHandler ===== func TestNewSSOSessionHandler_Cov5(t *testing.T) { h := NewSSOSessionHandler(nil) assert.NotNil(t, h) } func TestSSOSessionHandler_CountByUser_Cov5(t *testing.T) { h := NewSSOSessionHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "CountByUser", func() { h.CountByUser(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestSSOSessionHandler_ListByUser_Cov5(t *testing.T) { h := NewSSOSessionHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "ListByUser", func() { h.ListByUser(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== SSEStreamHandler ===== func TestNewSSEStreamHandler_Cov5(t *testing.T) { h := NewSSEStreamHandler(nil, nil) assert.NotNil(t, h) } func TestSSEStreamHandler_StreamCopilotMessage_Cov5(t *testing.T) { h := NewSSEStreamHandler(nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "StreamCopilotMessage", func() { h.StreamCopilotMessage(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== PlatformAccountHandler ===== func TestNewPlatformAccountHandler_Cov5(t *testing.T) { h := NewPlatformAccountHandler(nil, nil, nil) assert.NotNil(t, h) } func TestPlatformAccountHandler_List_Cov5(t *testing.T) { h := NewPlatformAccountHandler(nil, nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestPlatformAccountHandler_Show_Cov5(t *testing.T) { h := NewPlatformAccountHandler(nil, nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Show", func() { h.Show(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== OIDCHandler ===== func TestNewOIDCHandler_Cov5(t *testing.T) { h := NewOIDCHandler(nil, nil, nil, nil, nil) assert.NotNil(t, h) } func TestOIDCHandler_GetConfig_Cov5(t *testing.T) { h := NewOIDCHandler(nil, nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "GetConfig", func() { h.GetConfig(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestOIDCHandler_Discovery_Cov5(t *testing.T) { h := NewOIDCHandler(nil, nil, nil, nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Discovery", func() { h.Discovery(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== MacroHandler ===== func TestNewMacroHandler_Cov5(t *testing.T) { h := NewMacroHandler(nil) assert.NotNil(t, h) } func TestMacroHandler_WithAuditService_Cov5(t *testing.T) { h := NewMacroHandler(nil) result := h.WithAuditService(nil) assert.NotNil(t, result) } func TestMacroHandler_List_Cov5(t *testing.T) { h := NewMacroHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== LabelHandler ===== func TestNewLabelHandler_Cov5(t *testing.T) { h := NewLabelHandler(nil, nil) assert.NotNil(t, h) } func TestLabelHandler_ListTags_Cov5(t *testing.T) { h := NewLabelHandler(nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "ListTags", func() { h.ListTags(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestLabelHandler_GetTag_Cov5(t *testing.T) { h := NewLabelHandler(nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "GetTag", func() { h.GetTag(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== InboxMemberHandler ===== func TestNewInboxMemberHandler_Cov5(t *testing.T) { h := NewInboxMemberHandler(nil) assert.NotNil(t, h) } func TestInboxMemberHandler_ListMembers_Cov5(t *testing.T) { h := NewInboxMemberHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "ListMembers", func() { h.ListMembers(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestInboxMemberHandler_ShowAccountScoped_Cov5(t *testing.T) { h := NewInboxMemberHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "ShowAccountScoped", func() { h.ShowAccountScoped(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== CopilotConfigHandler ===== func TestNewCopilotConfigHandler_Cov5(t *testing.T) { h := NewCopilotConfigHandler(nil, nil) assert.NotNil(t, h) } func TestCopilotConfigHandler_WithAuditService_Cov5(t *testing.T) { h := NewCopilotConfigHandler(nil, nil) result := h.WithAuditService(nil) assert.NotNil(t, result) } func TestCopilotConfigHandler_WithArticleService_Cov5(t *testing.T) { h := NewCopilotConfigHandler(nil, nil) result := h.WithArticleService(nil) assert.NotNil(t, result) } func TestCopilotConfigHandler_PlatformGet_Cov5(t *testing.T) { h := NewCopilotConfigHandler(nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "PlatformGet", func() { h.PlatformGet(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestCopilotConfigHandler_AccountGet_Cov5(t *testing.T) { h := NewCopilotConfigHandler(nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "AccountGet", func() { h.AccountGet(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== CaptainPreferenceHandler ===== func TestNewCaptainPreferenceHandler_Cov5(t *testing.T) { h := NewCaptainPreferenceHandler(nil) assert.NotNil(t, h) } func TestCaptainPreferenceHandler_Get_Cov5(t *testing.T) { h := NewCaptainPreferenceHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Get", func() { h.Get(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestCaptainPreferenceHandler_Create_Cov5(t *testing.T) { h := NewCaptainPreferenceHandler(nil) c, w := newCtx_Cov5("POST", "/", `{}`) safeCall_Cov5(t, "Create", func() { h.Create(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== CaptainDocumentHandler ===== func TestNewCaptainDocumentHandler_Cov5(t *testing.T) { h := NewCaptainDocumentHandler(nil) assert.NotNil(t, h) } func TestCaptainDocumentHandler_List_Cov5(t *testing.T) { h := NewCaptainDocumentHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestCaptainDocumentHandler_Get_Cov5(t *testing.T) { h := NewCaptainDocumentHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Get", func() { h.Get(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== CaptainConversationHandler ===== func TestNewCaptainConversationHandler_Cov5(t *testing.T) { h := NewCaptainConversationHandler(nil) assert.NotNil(t, h) } func TestCaptainConversationHandler_BuildResponse_Cov5(t *testing.T) { h := NewCaptainConversationHandler(nil) c, w := newCtx_Cov5("POST", "/", `{}`) safeCall_Cov5(t, "BuildResponse", func() { h.BuildResponse(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== CaptainAssistantHandler ===== func TestNewCaptainAssistantHandler_Cov5(t *testing.T) { h := NewCaptainAssistantHandler(nil) assert.NotNil(t, h) } func TestCaptainAssistantHandler_List_Cov5(t *testing.T) { h := NewCaptainAssistantHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestCaptainAssistantHandler_GetConfig_Cov5(t *testing.T) { h := NewCaptainAssistantHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "GetConfig", func() { h.GetConfig(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== AutomationRuleHandler ===== func TestNewAutomationRuleHandler_Cov5(t *testing.T) { h := NewAutomationRuleHandler(nil) assert.NotNil(t, h) } func TestAutomationRuleHandler_WithAuditService_Cov5(t *testing.T) { h := NewAutomationRuleHandler(nil) result := h.WithAuditService(nil) assert.NotNil(t, result) } func TestAutomationRuleHandler_List_Cov5(t *testing.T) { h := NewAutomationRuleHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== ArticleHandler ===== func TestNewArticleHandler_Cov5(t *testing.T) { h := NewArticleHandler(nil) assert.NotNil(t, h) } func TestArticleHandler_PublicList_Cov5(t *testing.T) { h := NewArticleHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "PublicList", func() { h.PublicList(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestArticleHandler_PublicSearch_Cov5(t *testing.T) { h := NewArticleHandler(nil) c, w := newCtx_Cov5("GET", "/?q=test", "") safeCall_Cov5(t, "PublicSearch", func() { h.PublicSearch(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestArticleHandler_PublicTrackingPixel_Cov5(t *testing.T) { h := NewArticleHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "PublicTrackingPixel", func() { h.PublicTrackingPixel(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== WorkingHourHandler ===== func TestNewWorkingHourHandler_Cov5(t *testing.T) { h := NewWorkingHourHandler(nil) assert.NotNil(t, h) } func TestWorkingHourHandler_GetWeeklySchedule_Cov5(t *testing.T) { h := NewWorkingHourHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "GetWeeklySchedule", func() { h.GetWeeklySchedule(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestWorkingHourHandler_IsOutOfOffice_Cov5(t *testing.T) { h := NewWorkingHourHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "IsOutOfOffice", func() { h.IsOutOfOffice(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== WebhookSubscriptionHandler ===== func TestNewWebhookSubscriptionHandler_Cov5(t *testing.T) { h := NewWebhookSubscriptionHandler(nil) assert.NotNil(t, h) } func TestWebhookSubscriptionHandler_List_Cov5(t *testing.T) { h := NewWebhookSubscriptionHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestWebhookSubscriptionHandler_Get_Cov5(t *testing.T) { h := NewWebhookSubscriptionHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Get", func() { h.Get(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== SummaryReportHandler ===== func TestNewSummaryReportHandler_Cov5(t *testing.T) { h := NewSummaryReportHandler(nil) assert.NotNil(t, h) } func TestSummaryReportHandler_Agent_Cov5(t *testing.T) { h := NewSummaryReportHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Agent", func() { h.Agent(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestSummaryReportHandler_Team_Cov5(t *testing.T) { h := NewSummaryReportHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Team", func() { h.Team(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== SSEEventHandler ===== func TestNewSSEEventHandler_Cov5(t *testing.T) { h := NewSSEEventHandler(nil) assert.NotNil(t, h) } func TestSSEEventHandler_StreamEvents_Cov5(t *testing.T) { h := NewSSEEventHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "StreamEvents", func() { h.StreamEvents(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== ShopifyIntegrationHandler ===== func TestNewShopifyIntegrationHandler_Cov5(t *testing.T) { h := NewShopifyIntegrationHandler(nil) assert.NotNil(t, h) } func TestShopifyIntegrationHandler_Delete_Cov5(t *testing.T) { h := NewShopifyIntegrationHandler(nil) c, w := newCtx_Cov5("DELETE", "/", "") safeCall_Cov5(t, "Delete", func() { h.Delete(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestShopifyIntegrationHandler_Auth_Cov5(t *testing.T) { h := NewShopifyIntegrationHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Auth", func() { h.Auth(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== PortalHandler ===== func TestNewPortalHandler_Cov5(t *testing.T) { h := NewPortalHandler(nil) assert.NotNil(t, h) } func TestPortalHandler_PublicRedirectDefaultLocale_Cov5(t *testing.T) { h := NewPortalHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "PublicRedirectDefaultLocale", func() { h.PublicRedirectDefaultLocale(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestPortalHandler_PublicSitemap_Cov5(t *testing.T) { h := NewPortalHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "PublicSitemap", func() { h.PublicSitemap(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== PlatformUserHandler ===== func TestNewPlatformUserHandler_Cov5(t *testing.T) { h := NewPlatformUserHandler(nil) assert.NotNil(t, h) } func TestPlatformUserHandler_Show_Cov5(t *testing.T) { h := NewPlatformUserHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Show", func() { h.Show(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestPlatformUserHandler_List_Cov5(t *testing.T) { h := NewPlatformUserHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== NotificationHandler ===== func TestNewNotificationHandler_Cov5(t *testing.T) { h := NewNotificationHandler(nil) assert.NotNil(t, h) } func TestNotificationHandler_WithEventPublisher_Cov5(t *testing.T) { h := NewNotificationHandler(nil) result := h.WithEventPublisher(nil) assert.NotNil(t, result) } func TestNotificationHandler_UnreadCount_Cov5(t *testing.T) { h := NewNotificationHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "UnreadCount", func() { h.UnreadCount(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== LinearIntegrationHandler ===== func TestNewLinearIntegrationHandler_Cov5(t *testing.T) { h := NewLinearIntegrationHandler(nil) assert.NotNil(t, h) } func TestLinearIntegrationHandler_Delete_Cov5(t *testing.T) { h := NewLinearIntegrationHandler(nil) c, w := newCtx_Cov5("DELETE", "/", "") safeCall_Cov5(t, "Delete", func() { h.Delete(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestLinearIntegrationHandler_GetTeams_Cov5(t *testing.T) { h := NewLinearIntegrationHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "GetTeams", func() { h.GetTeams(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== InboxCsatTemplateHandler ===== func TestNewInboxCsatTemplateHandler_Cov5(t *testing.T) { h := NewInboxCsatTemplateHandler(nil) assert.NotNil(t, h) } func TestInboxCsatTemplateHandler_Show_Cov5(t *testing.T) { h := NewInboxCsatTemplateHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Show", func() { h.Show(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestInboxCsatTemplateHandler_Analyze_Cov5(t *testing.T) { h := NewInboxCsatTemplateHandler(nil) c, w := newCtx_Cov5("POST", "/", `{}`) safeCall_Cov5(t, "Analyze", func() { h.Analyze(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== EmailChannelMigrationHandler ===== func TestNewEmailChannelMigrationHandler_Cov5(t *testing.T) { h := NewEmailChannelMigrationHandler(nil) assert.NotNil(t, h) } func TestEmailChannelMigrationHandler_List_Cov5(t *testing.T) { h := NewEmailChannelMigrationHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== DraftMessageHandler ===== func TestNewDraftMessageHandler_Cov5(t *testing.T) { h := NewDraftMessageHandler(nil) assert.NotNil(t, h) } func TestDraftMessageHandler_Show_Cov5(t *testing.T) { h := NewDraftMessageHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Show", func() { h.Show(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestDraftMessageHandler_List_Cov5(t *testing.T) { h := NewDraftMessageHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== DashboardAppHandler ===== func TestNewDashboardAppHandler_Cov5(t *testing.T) { h := NewDashboardAppHandler(nil) assert.NotNil(t, h) } func TestDashboardAppHandler_List_Cov5(t *testing.T) { h := NewDashboardAppHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestDashboardAppHandler_Search_Cov5(t *testing.T) { h := NewDashboardAppHandler(nil) c, w := newCtx_Cov5("GET", "/?q=test", "") safeCall_Cov5(t, "Search", func() { h.Search(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== CustomRoleHandler ===== func TestNewCustomRoleHandler_Cov5(t *testing.T) { h := NewCustomRoleHandler(nil) assert.NotNil(t, h) } func TestCustomRoleHandler_WithAuditService_Cov5(t *testing.T) { h := NewCustomRoleHandler(nil) result := h.WithAuditService(nil) assert.NotNil(t, result) } func TestCustomRoleHandler_List_Cov5(t *testing.T) { h := NewCustomRoleHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== CsatMetricsHandler ===== func TestNewCsatMetricsHandler_Cov5(t *testing.T) { h := NewCsatMetricsHandler(nil) assert.NotNil(t, h) } func TestCsatMetricsHandler_Metrics_Cov5(t *testing.T) { h := NewCsatMetricsHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Metrics", func() { h.Metrics(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== ConversationHandler ===== func TestNewConversationHandler_Cov5(t *testing.T) { h := NewConversationHandler(nil, nil) assert.NotNil(t, h) } func TestConversationHandler_WithAuditService_Cov5(t *testing.T) { h := NewConversationHandler(nil, nil) result := h.WithAuditService(nil) assert.NotNil(t, result) } func TestConversationHandler_WithContactPresence_Cov5(t *testing.T) { h := NewConversationHandler(nil, nil) result := h.WithContactPresence(nil) assert.NotNil(t, result) } // ===== CategoryHandler ===== func TestNewCategoryHandler_Cov5(t *testing.T) { h := NewCategoryHandler(nil) assert.NotNil(t, h) } func TestCategoryHandler_PublicList_Cov5(t *testing.T) { h := NewCategoryHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "PublicList", func() { h.PublicList(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestCategoryHandler_PublicGet_Cov5(t *testing.T) { h := NewCategoryHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "PublicGet", func() { h.PublicGet(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== CaptainTaskHandler ===== func TestNewCaptainTaskHandler_Cov5(t *testing.T) { h := NewCaptainTaskHandler(nil) assert.NotNil(t, h) } func TestCaptainTaskHandler_Summarize_Cov5(t *testing.T) { h := NewCaptainTaskHandler(nil) c, w := newCtx_Cov5("POST", "/", `{}`) safeCall_Cov5(t, "Summarize", func() { h.Summarize(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestCaptainTaskHandler_Rewrite_Cov5(t *testing.T) { h := NewCaptainTaskHandler(nil) c, w := newCtx_Cov5("POST", "/", `{}`) safeCall_Cov5(t, "Rewrite", func() { h.Rewrite(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== CaptainCustomToolHandler ===== func TestNewCaptainCustomToolHandler_Cov5(t *testing.T) { h := NewCaptainCustomToolHandler(nil) assert.NotNil(t, h) } func TestCaptainCustomToolHandler_List_Cov5(t *testing.T) { h := NewCaptainCustomToolHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== BulkActionHandler ===== func TestNewBulkActionHandler_Cov5(t *testing.T) { h := NewBulkActionHandler(nil, nil) assert.NotNil(t, h) } func TestBulkActionHandler_WithWorkerPool_Cov5(t *testing.T) { h := NewBulkActionHandler(nil, nil) result := h.WithWorkerPool(nil) assert.NotNil(t, result) } // ===== AuditHandler ===== func TestNewAuditHandler_Cov5(t *testing.T) { h := NewAuditHandler(nil) assert.NotNil(t, h) } func TestAuditHandler_List_Cov5(t *testing.T) { h := NewAuditHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestAuditHandler_Get_Cov5(t *testing.T) { h := NewAuditHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "Get", func() { h.Get(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== PlatformAppHandler ===== func TestNewPlatformAppHandler_Cov5(t *testing.T) { h := NewPlatformAppHandler(nil) assert.NotNil(t, h) } func TestPlatformAppHandler_List_Cov5(t *testing.T) { h := NewPlatformAppHandler(nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "List", func() { h.List(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } func TestPlatformAppHandler_Search_Cov5(t *testing.T) { h := NewPlatformAppHandler(nil) c, w := newCtx_Cov5("GET", "/?q=test", "") safeCall_Cov5(t, "Search", func() { h.Search(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) } // ===== WebWidgetPreChatHandler ===== func TestNewWebWidgetPreChatHandler_Cov5(t *testing.T) { h := NewWebWidgetPreChatHandler(nil, nil) assert.NotNil(t, h) } func TestWebWidgetPreChatHandler_GetPreChatForm_Cov5(t *testing.T) { h := NewWebWidgetPreChatHandler(nil, nil) c, w := newCtx_Cov5("GET", "/", "") safeCall_Cov5(t, "GetPreChatForm", func() { h.GetPreChatForm(c) }) assert.True(t, w.Code >= 200 || w.Code == 0) }