Files
gochat/backend/internal/autoassignment/coverage3_test.go
T
Rogeeandrogee 17244bcc9d HH-554: connect auto-assignment runtime policy (#135)
* fix(HH-554): connect auto-assignment runtime policy

* fix(HH-554): bound and coalesce assignment jobs

* fix(HH-554): drain assignment backlog safely

* fix(HH-554): hold assignment claim through retries

---------

Co-authored-by: Rogee <rogee@ipao.vip>
2026-08-23 22:28:43 +08:00

26 lines
725 B
Go

package autoassignment
import (
"context"
"testing"
"github.com/gochat/gochat/internal/model"
"github.com/stretchr/testify/require"
)
func TestAutoAssignmentListener_GetConversation_Cov3(t *testing.T) {
db := setupAADB_Cov2(t)
l := &AutoAssignmentListener{db: db}
conv := &model.Conversation{AccountID: 1, InboxID: 1, ContactID: 1, Status: "open"}
require.NoError(t, db.Create(conv).Error)
defer func() { _ = recover() }()
_, _ = l.getConversation(context.Background(), conv.ID)
}
func TestAssignmentService_AgentHasInboxCapacity_Cov3(t *testing.T) {
db := setupAADB_Cov2(t)
s := &AssignmentService{db: db}
defer func() { _ = recover() }()
_, _ = s.agentHasInboxCapacity(context.Background(), 1, 1, 1, 0)
}