dal/pkg/builder/convert_conflict_test.go
Anton Nesterov 1db30b92c2
[wip] builder
Signed-off-by: Anton Nesterov <anton@demiurg.io>
2024-08-09 21:14:28 +02:00

19 lines
345 B
Go

package builder
import (
"testing"
)
func TestConvertConflict(t *testing.T) {
ctx := SQLiteContext{
TableName: "test",
TableAlias: "t",
FieldName: "test",
}
result := ConvertConflict(ctx, "a", "b", "tb.c")
if result != `ON CONFLICT (t.a,t.b,tb.c) DO` {
t.Errorf(`Expected "ON CONFLICT (t.a,t.b,tb.c) DO", got %s`, result)
}
}