moretesting

This commit is contained in:
Michael McGuinness
2024-12-23 18:13:57 +00:00
parent 1a5fab87c6
commit eb917fb25e
10 changed files with 245 additions and 40 deletions
+24
View File
@@ -0,0 +1,24 @@
package document_test
import (
"gotemplate/internal/database/repository"
"gotemplate/internal/result"
"testing"
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
"github.com/stretchr/testify/assert"
)
func TestParseResultValue(t *testing.T) {
dbResult := repository.ListResultValuesByIDRow{
ID: pgtype.UUID{},
Queryid: pgtype.UUID{},
Value: "",
}
value := result.ParseResultValue(dbResult)
assert.Equal(t, dbResult.Value, value.Value)
assert.Equal(t, uuid.Nil, value.ID)
assert.Equal(t, uuid.Nil, value.QueryID)
}