fix: make MySQL writer execute generated DDL
This commit is contained in:
@@ -9,6 +9,13 @@ import (
|
||||
"git.warky.dev/wdevs/relspecgo/pkg/writers"
|
||||
)
|
||||
|
||||
func TestStripComments(t *testing.T) {
|
||||
got := stripComments("-- header\nCREATE TABLE `users` (\n `id` INT\n);")
|
||||
if strings.HasPrefix(got, "--") || !strings.HasPrefix(got, "CREATE TABLE") {
|
||||
t.Fatalf("stripComments() = %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestWriterGeneratesMySQLDDL(t *testing.T) {
|
||||
db := models.InitDatabase("app")
|
||||
s := models.InitSchema("app")
|
||||
|
||||
Reference in New Issue
Block a user