mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-06 10:21:05 +02:00
default list matcher to has
This commit is contained in:
parent
e0e6b9a8d7
commit
ffa6f46a79
2 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ func matchStringList(dst *ast.Body, left *ast.Term, right parser.Value) error {
|
|||
str, ok := right.(parser.String)
|
||||
if ok {
|
||||
right = parser.Object{
|
||||
"is": str,
|
||||
"has": str,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -98,6 +98,6 @@ func TestStringListMatcher(t *testing.T) {
|
|||
var body ast.Body
|
||||
err := matchStringList(&body, ast.VarTerm("example"), parser.String("test"))
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, `count(example) == 1`+"\n"+`count([true | some v; v = example[_]; v == "test"]) > 0`, str(body))
|
||||
assert.Equal(t, `count([true | some v; v = example[_]; v == "test"]) > 0`, str(body))
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue