From 5c239ad61d9b6ee0e4f722f6a567c6a549fc02c0 Mon Sep 17 00:00:00 2001 From: Kharec Date: Fri, 21 Nov 2025 16:50:23 +0100 Subject: [PATCH] feat: add missing GetVoteCountsByPostID method to the errorVoteRepository test mock --- internal/handlers/post_handler_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/handlers/post_handler_test.go b/internal/handlers/post_handler_test.go index 927c96c..67eca4e 100644 --- a/internal/handlers/post_handler_test.go +++ b/internal/handlers/post_handler_test.go @@ -669,6 +669,7 @@ func (e *errorVoteRepository) Delete(uint) error { ret func (e *errorVoteRepository) Count() (int64, error) { return 0, nil } func (e *errorVoteRepository) CountByPostID(uint) (int64, error) { return 0, nil } func (e *errorVoteRepository) CountByUserID(uint) (int64, error) { return 0, nil } +func (e *errorVoteRepository) GetVoteCountsByPostID(uint) (int, int, error) { return 0, 0, errors.New("database error") } func (e *errorVoteRepository) WithTx(*gorm.DB) repositories.VoteRepository { return e } func TestPostHandler_EdgeCases(t *testing.T) {