mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 15:49:39 +02:00
Sanitize input for ilike in Account::Entry.search (#988)
This commit is contained in:
parent
cdbca5aff3
commit
d0bc959bee
2 changed files with 4 additions and 1 deletions
|
@ -62,6 +62,9 @@ class Account::EntryTest < ActiveSupport::TestCase
|
|||
params = params.merge(categories: [ category.name ], merchants: [ merchant.name ]) # transaction specific search param
|
||||
|
||||
assert_equal 1, family.entries.search(params).size
|
||||
|
||||
params = { search: "%" }
|
||||
assert_equal 0, family.entries.search(params).size
|
||||
end
|
||||
|
||||
test "can calculate total spending for a group of transactions" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue