fix test model

This commit is contained in:
Adrian Zürcher
2025-12-24 12:09:34 +01:00
parent 48793c65bc
commit 537179af03

View File

@@ -7,6 +7,7 @@ import (
"testing" "testing"
"gitea.tecamino.com/paadi/html2pdf/converter" "gitea.tecamino.com/paadi/html2pdf/converter"
"gitea.tecamino.com/paadi/html2pdf/models"
) )
func TestConvert(t *testing.T) { func TestConvert(t *testing.T) {
@@ -27,14 +28,14 @@ func TestConvertFiles(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
var input []converter.File var input []models.File
for _, f := range files { for _, f := range files {
ext := filepath.Ext(f.Name()) ext := filepath.Ext(f.Name())
if ext != ".html" { if ext != ".html" {
continue continue
} }
input = append(input, converter.File{ input = append(input, models.File{
Input: filepath.Join(rootPath, f.Name()), Input: filepath.Join(rootPath, f.Name()),
Output: strings.Replace(f.Name(), ext, ".pdf", 1), Output: strings.Replace(f.Name(), ext, ".pdf", 1),
}) })