Add tests

This commit is contained in:
Jon Staab
2025-09-26 13:47:57 -07:00
parent f3f56491ad
commit cfff2b0ca9
9 changed files with 1357 additions and 25 deletions
+25
View File
@@ -0,0 +1,25 @@
package zooid
import (
"testing"
)
func TestSchema_Render(t *testing.T) {
schema := Schema{Name: "test_db"}
result := schema.Render("CREATE TABLE {{.Name}}_events")
expected := "CREATE TABLE test_db_events"
if result != expected {
t.Errorf("Schema.Render() = %q, expected %q", result, expected)
}
}
func TestSchema_Prefix(t *testing.T) {
schema := Schema{Name: "test_db"}
result := schema.Prefix("events")
expected := "test_db__events"
if result != expected {
t.Errorf("Schema.Prefix() = %q, expected %q", result, expected)
}
}