You've already forked agentic-coding-workflow
改动
This commit is contained in:
@@ -118,6 +118,10 @@ func (r *convFakeRepo) SoftDeleteConversation(_ context.Context, id uuid.UUID) e
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *convFakeRepo) ListAttachmentsForMessage(_ context.Context, _ int64) ([]Attachment, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (r *convFakeRepo) ListMessagesByConversation(_ context.Context, convID uuid.UUID, _ *int64, limit int) ([]Message, error) {
|
||||
r.mu.Lock()
|
||||
defer r.mu.Unlock()
|
||||
@@ -335,7 +339,7 @@ func TestConversationService_Get_HappyPath(t *testing.T) {
|
||||
{ID: 1, ConversationID: conv.ID, Role: RoleUser, Content: "hello"},
|
||||
}
|
||||
|
||||
got, msgs, err := svc.Get(context.Background(), userID, conv.ID)
|
||||
got, msgs, err := svc.Get(context.Background(), userID, conv.ID, 50)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, got)
|
||||
assert.Equal(t, conv.ID, got.ID)
|
||||
@@ -350,7 +354,7 @@ func TestConversationService_Get_NotOwner(t *testing.T) {
|
||||
callerID := uuid.Must(uuid.NewV7())
|
||||
conv := addConversation(repo, ownerID)
|
||||
|
||||
_, _, err := svc.Get(context.Background(), callerID, conv.ID)
|
||||
_, _, err := svc.Get(context.Background(), callerID, conv.ID, 50)
|
||||
require.Error(t, err)
|
||||
var appErr *errs.AppError
|
||||
require.ErrorAs(t, err, &appErr)
|
||||
|
||||
Reference in New Issue
Block a user