movetests
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package repository_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"queryorchestration/internal/database/repository"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestQueryTypeScan(t *testing.T) {
|
||||
qType := repository.Querytype(fmt.Sprint(0))
|
||||
|
||||
stringType := "context_full"
|
||||
err := qType.Scan(stringType)
|
||||
assert.Nil(t, err)
|
||||
}
|
||||
|
||||
func TestNullQueryTypeScan(t *testing.T) {
|
||||
qType := repository.NullQuerytype{}
|
||||
|
||||
stringType := "context_full"
|
||||
err := qType.Scan(stringType)
|
||||
assert.Nil(t, err)
|
||||
}
|
||||
|
||||
func TestNullQueryTypeValue(t *testing.T) {
|
||||
qType := repository.NullQuerytype{}
|
||||
|
||||
stringType := "context_full"
|
||||
err := qType.Scan(stringType)
|
||||
assert.Nil(t, err)
|
||||
|
||||
val, err := qType.Value()
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, stringType, val)
|
||||
}
|
||||
Reference in New Issue
Block a user