mirror of
https://github.com/neilotoole/sq.git
synced 2024-12-19 14:11:45 +03:00
22 lines
444 B
Go
22 lines
444 B
Go
|
package json
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"os"
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/require"
|
||
|
|
||
|
"github.com/neilotoole/sq/testh/sakila"
|
||
|
)
|
||
|
|
||
|
func TestPredictColKindsJSONA(t *testing.T) {
|
||
|
f, err := os.Open("testdata/actor.jsona")
|
||
|
require.NoError(t, err)
|
||
|
t.Cleanup(func() { require.NoError(t, f.Close()) })
|
||
|
|
||
|
kinds, err := predictColKindsJSONA(context.Background(), f)
|
||
|
require.NoError(t, err)
|
||
|
require.Equal(t, sakila.TblActorColKinds(), kinds)
|
||
|
}
|