Commit 2aaaef79 authored by Johnny's avatar Johnny

chore: fix tests

parent 2dc7766f
...@@ -26,7 +26,7 @@ func TestRestoreExprToSQL(t *testing.T) { ...@@ -26,7 +26,7 @@ func TestRestoreExprToSQL(t *testing.T) {
}, },
{ {
filter: `content.contains("memos")`, filter: `content.contains("memos")`,
want: "memo.content ILIKE LIKE $1", want: "memo.content ILIKE $1",
args: []any{"%memos%"}, args: []any{"%memos%"},
}, },
{ {
...@@ -46,7 +46,7 @@ func TestRestoreExprToSQL(t *testing.T) { ...@@ -46,7 +46,7 @@ func TestRestoreExprToSQL(t *testing.T) {
}, },
{ {
filter: `tag in ['tag1'] || content.contains('hello')`, filter: `tag in ['tag1'] || content.contains('hello')`,
want: "(memo.payload->'tags' @> $1::jsonb OR memo.content ILIKE LIKE $2)", want: "(memo.payload->'tags' @> $1::jsonb OR memo.content ILIKE $2)",
args: []any{[]any{"tag1"}, "%hello%"}, args: []any{[]any{"tag1"}, "%hello%"},
}, },
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment