package facebook import ( "context" "testing" "github.com/stretchr/testify/require" ) func safeCall_Cov12(fn func()) { defer func() { _ = recover() }(); fn() } // UserMappingService tests // NewFacebookEventListener and NewInstagramEventListener func TestNewFacebookEventListener_Nil_Cov12(t *testing.T) { safeCall_Cov12(func() { _ = NewFacebookEventListener(nil, nil, nil, nil) }) } func TestNewInstagramEventListener_Nil_Cov12(t *testing.T) { safeCall_Cov12(func() { _ = NewInstagramEventListener(nil, nil, nil, nil) }) } // Test pipeline and media functions that are still 0% func TestIncomingProcessor_ProcessDeliveryReceipt_Nil_Cov12(t *testing.T) { p := &IncomingProcessor{} safeCall_Cov12(func() { require.NoError(t, p.ProcessDeliveryReceipt(context.Background(), nil, nil)) }) } func TestIncomingProcessor_ProcessReadReceipt_Nil_Cov12(t *testing.T) { p := &IncomingProcessor{} safeCall_Cov12(func() { require.NoError(t, p.ProcessReadReceipt(context.Background(), nil, nil)) }) } func TestIncomingProcessor_ProcessInstagramCommentEvent_Nil_Cov12(t *testing.T) { p := &IncomingProcessor{} safeCall_Cov12(func() { _ = p.ProcessInstagramCommentEvent(context.Background(), nil, nil) }) } // Media service tests // Service tests with more args func TestService_CreateFacebookChannel_Full_Cov12(t *testing.T) { s := &Service{} safeCall_Cov12(func() { _, _ = s.CreateFacebookChannel(context.Background(), 0, "", "", "") }) } func TestService_CreateInstagramChannel_Full_Cov12(t *testing.T) { s := &Service{} safeCall_Cov12(func() { _, _ = s.CreateInstagramChannel(context.Background(), 0, "", "", "", "") }) } func TestService_MarkReauthorizationRequired_Full_Cov12(t *testing.T) { s := &Service{} safeCall_Cov12(func() { _ = s.MarkReauthorizationRequired(context.Background(), 0, "", "") }) } func TestService_ExtractPageAccessTokenFromInbox_Nil_Cov12(t *testing.T) { s := &Service{} safeCall_Cov12(func() { _ = s.extractPageAccessTokenFromInbox(nil) }) } // Repository tests func TestRepository_UpdateFacebookPageAccessToken_Nil_Cov12(t *testing.T) { r := &Repository{} safeCall_Cov12(func() { _ = r.UpdateFacebookPageAccessToken(context.Background(), 0, "") }) } func TestRepository_UpdateInstagramPageAccessToken_Nil_Cov12(t *testing.T) { r := &Repository{} safeCall_Cov12(func() { _ = r.UpdateInstagramPageAccessToken(context.Background(), 0, "") }) } func TestRepository_GetInstagramByAccountID_Nil_Cov12(t *testing.T) { r := &Repository{} safeCall_Cov12(func() { _, _ = r.GetInstagramByAccountID(context.Background(), "") }) } func TestRepository_GetInstagramByConnectedFBPageID_Nil_Cov12(t *testing.T) { r := &Repository{} safeCall_Cov12(func() { _, _ = r.GetInstagramByConnectedFBPageID(context.Background(), "") }) } // Webhook handler tests func TestDetermineContentType_Nil_Cov12(t *testing.T) { safeCall_Cov12(func() { _ = determineContentType(nil) }) }