moretesting
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user