Files
query-orchestration/test/unit/internal/result/parse_test.go
T
Michael McGuinness eb917fb25e moretesting
2024-12-23 18:13:57 +00:00

25 lines
551 B
Go

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)
}