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

@@ -3,6 +3,7 @@ package apitest
import (
"testing"
"git.artlef.fr/PersonalLibraryManager/internal/dto"
"git.artlef.fr/PersonalLibraryManager/internal/testutils"
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/assert"
@@ -26,6 +27,6 @@ func TestGetWantReadBooksHandler_Demo2(t *testing.T) {
assert.Equal(t, int64(0), result.Count)
}
func testGetWantReadBooksHandler(t *testing.T, router *gin.Engine, userToken string, expectedCode int) bookUserGet {
func testGetWantReadBooksHandler(t *testing.T, router *gin.Engine, userToken string, expectedCode int) dto.BookUserGet {
return testGetbooksHandler(t, router, userToken, expectedCode, "/mybooks/wantread")
}