+22
-22
internal/core/comments/comment_service_test.go
···························-service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo).(*commentService)+service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo, nil, nil, nil).(*commentService)···normalComment := createTestComment("at://did:plc:commenter123/comment/2", "did:plc:commenter123", "commenter.test", postURI, postURI, 0)-service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo).(*commentService)+service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo, nil, nil, nil).(*commentService)result := service.buildThreadViews(context.Background(), []*Comment{deletedComment, normalComment}, 10, "hot", nil)···-service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo).(*commentService)+service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo, nil, nil, nil).(*commentService)result := service.buildThreadViews(context.Background(), []*Comment{parentComment}, 1, "hot", nil)···parentComment := createTestComment("at://did:plc:commenter123/comment/1", "did:plc:commenter123", "commenter.test", postURI, postURI, 5)-service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo).(*commentService)+service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo, nil, nil, nil).(*commentService)result := service.buildThreadViews(context.Background(), []*Comment{parentComment}, 0, "hot", nil)···comment := createTestComment(commentURI, "did:plc:commenter123", "commenter.test", postURI, postURI, 0)-service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo).(*commentService)+service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo, nil, nil, nil).(*commentService)···comment := createTestComment(commentURI, "did:plc:commenter123", "commenter.test", postURI, postURI, 0)-service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo).(*commentService)+service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo, nil, nil, nil).(*commentService)···comment := createTestComment(childCommentURI, "did:plc:commenter123", "commenter.test", postURI, parentCommentURI, 0)-service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo).(*commentService)+service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo, nil, nil, nil).(*commentService)···-service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo).(*commentService)+service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo, nil, nil, nil).(*commentService)result := service.buildCommentView(comment, &viewerDID, voteStates, make(map[string]*users.User))···-service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo).(*commentService)+service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo, nil, nil, nil).(*commentService)result := service.buildCommentView(comment, &viewerDID, voteStates, make(map[string]*users.User))···comment := createTestComment("at://did:plc:commenter123/comment/1", "did:plc:commenter123", "commenter.test", postURI, postURI, 0)-service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo).(*commentService)+service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo, nil, nil, nil).(*commentService)···comment := createTestComment("at://did:plc:commenter123/comment/1", "did:plc:commenter123", "commenter.test", postURI, postURI, 0)-service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo).(*commentService)+service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo, nil, nil, nil).(*commentService)···comment := createTestComment("at://did:plc:commenter123/comment/1", "did:plc:commenter123", "commenter.test", postURI, postURI, 0)-service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo).(*commentService)+service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo, nil, nil, nil).(*commentService)···comment := createTestComment("at://did:plc:commenter123/comment/1", "did:plc:commenter123", "commenter.test", postURI, postURI, 0)-service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo).(*commentService)+service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo, nil, nil, nil).(*commentService)···-service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo).(*commentService)+service := NewCommentService(commentRepo, userRepo, postRepo, communityRepo, nil, nil, nil).(*commentService)
+1208
internal/core/comments/comment_write_service_test.go
···+func (m *mockPDSClient) CreateRecord(ctx context.Context, collection, rkey string, record interface{}) (string, string, error) {+func (m *mockPDSClient) GetRecord(ctx context.Context, collection, rkey string) (*pds.RecordResponse, error) {+func (m *mockPDSClient) ListRecords(ctx context.Context, collection string, limit int, cursor string) (*pds.ListRecordsResponse, error) {+func (f *mockPDSClientFactory) create(ctx context.Context, session *oauth.ClientSessionData) (pds.Client, error) {+t.Errorf("Expected root URI to be preserved as %s, got %s", originalRootURI, updatedRecord.Reply.Root.URI)+t.Errorf("Expected root CID to be preserved as %s, got %s", originalRootCID, updatedRecord.Reply.Root.CID)+t.Errorf("Expected content to be updated to 'Updated content', got %s", updatedRecord.Content)