test
This commit is contained in:
parent
882b4311b5
commit
52df659318
1 changed files with 9 additions and 0 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue