Make names case insensitive for API

This commit is contained in:
breel
2020-07-25 13:58:02 -06:00
parent 34075cf19a
commit ee4f23a9f4
6 changed files with 75 additions and 32 deletions

View File

@@ -38,6 +38,7 @@ func TestIntegration(t *testing.T) {
randomOne(),
}
ones[0].Connections = map[string]entity.One{ones[2].Name: entity.One{Name: ones[2].Name, Relationship: ":("}}
ones[1].Name = ones[0].Name[1 : len(ones[0].Name)-1]
cleanFill := func() {
clean()
for i := range ones {
@@ -255,7 +256,7 @@ func TestIntegration(t *testing.T) {
t.Fatal(err)
}
err = graph.Delete(ctx, "col", operator.Regex{Key: entity.Name, Value: "^(?i)" + one.Name})
err = graph.Delete(ctx, "col", operator.CaseInsensitive{Key: entity.Name, Value: one.Name})
if err != nil {
t.Fatal(err)
}
@@ -282,7 +283,7 @@ func TestIntegration(t *testing.T) {
t.Fatal(err)
}
err = graph.Delete(ctx, "col", operator.Regex{Key: entity.Name, Value: "^(?i)" + one.Name})
err = graph.Delete(ctx, "col", operator.CaseInsensitive{Key: entity.Name, Value: one.Name})
if err != nil {
t.Fatal(err)
}