This commit is contained in:
Mike Nelson 2024-08-28 11:45:44 -06:00
parent 882b4311b5
commit 52df659318

View file

@ -222,10 +222,18 @@ func TestGenerator_TableMetadata(t *testing.T) {
// Spot check the actor table and assert that the emitted // Spot check the actor table and assert that the emitted
// properties are as expected. // properties are as expected.
var got metadata.Table var got metadata.Table
var specialFeatures metadata.Column
for _, table := range schema.TablesMetaData { for _, table := range schema.TablesMetaData {
if table.Name == "actor" { if table.Name == "actor" {
got = table got = table
} }
if table.Name == "film" {
for _, column := range table.Columns {
if column.Name == "special_features" {
specialFeatures = column
}
}
}
} }
want := metadata.Table{ want := metadata.Table{
@ -238,6 +246,7 @@ func TestGenerator_TableMetadata(t *testing.T) {
}, },
} }
require.Equal(t, want, got) require.Equal(t, want, got)
require.Equal(t, metadata.ArrayType, specialFeatures.DataType.Kind)
} }
func TestGeneratorSpecialCharacters(t *testing.T) { func TestGeneratorSpecialCharacters(t *testing.T) {