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