Use dto from code for unit tests
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user