Files
zooid/zooid/schema_test.go
T
Jon Staab cfff2b0ca9 Add tests
2025-09-26 15:07:40 -07:00

26 lines
548 B
Go

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)
}
}