Use dto from code for unit tests

This commit is contained in:
2026-02-03 18:24:42 +01:00
parent fe75973acd
commit 02e4c579c6
4 changed files with 17 additions and 26 deletions

View File

@@ -4,6 +4,7 @@ import (
"net/url"
"testing"
"git.artlef.fr/PersonalLibraryManager/internal/dto"
"git.artlef.fr/PersonalLibraryManager/internal/testutils"
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/assert"
@@ -27,7 +28,7 @@ func TestGetReadingBooksHandler_Demo2(t *testing.T) {
assert.Equal(t, int64(0), result.Count)
}
func testGetReadingBooksHandler(t *testing.T, router *gin.Engine, userToken string, expectedCode int, limit string, offset string) bookUserGet {
func testGetReadingBooksHandler(t *testing.T, router *gin.Engine, userToken string, expectedCode int, limit string, offset string) dto.BookUserGet {
u, err := url.Parse("/mybooks/reading")
if err != nil {
t.Error(err)