From 4b04461ebb0bb2607e9e2cea260f5f94bb649741 Mon Sep 17 00:00:00 2001 From: Kharec Date: Fri, 21 Nov 2025 17:06:04 +0100 Subject: [PATCH] style: minor formatting adjustments --- internal/handlers/post_handler_test.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/internal/handlers/post_handler_test.go b/internal/handlers/post_handler_test.go index 67eca4e..e97a19d 100644 --- a/internal/handlers/post_handler_test.go +++ b/internal/handlers/post_handler_test.go @@ -663,13 +663,15 @@ func (e *errorVoteRepository) GetByVoteHash(string) (*database.Vote, error) { func (e *errorVoteRepository) GetByPostID(uint) ([]database.Vote, error) { return nil, errors.New("database error") } -func (e *errorVoteRepository) GetByUserID(uint) ([]database.Vote, error) { return nil, nil } -func (e *errorVoteRepository) Update(*database.Vote) error { return nil } -func (e *errorVoteRepository) Delete(uint) error { return nil } -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) GetByUserID(uint) ([]database.Vote, error) { return nil, nil } +func (e *errorVoteRepository) Update(*database.Vote) error { return nil } +func (e *errorVoteRepository) Delete(uint) error { return nil } +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) {