1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-10 07:55:21 +02:00

Fix failing tests

This commit is contained in:
Zach Gollwitzer 2025-04-10 16:51:49 -04:00
parent eabacb2d01
commit edfa7726be
2 changed files with 4 additions and 4 deletions

View file

@ -4,7 +4,7 @@ class Rule::ActionTest < ActiveSupport::TestCase
include Account::EntriesTestHelper
setup do
@family = families(:empty)
@family = families(:dylan_family)
@transaction_rule = rules(:one)
@account = @family.accounts.create!(name: "Rule test", balance: 1000, currency: "USD", accountable: Depository.new)

View file

@ -36,7 +36,7 @@ class Rule::ConditionTest < ActiveSupport::TestCase
assert_equal 1, filtered.count
end
test "applies transaction_amount condition" do
test "applies transaction_amount condition using absolute values" do
condition = Rule::Condition.new(
rule: @transaction_rule,
condition_type: "transaction_amount",
@ -45,7 +45,7 @@ class Rule::ConditionTest < ActiveSupport::TestCase
)
filtered = condition.apply(@rule_scope)
assert_equal 2, filtered.count
assert_equal 3, filtered.count
end
test "applies transaction_merchant condition" do
@ -103,6 +103,6 @@ class Rule::ConditionTest < ActiveSupport::TestCase
)
filtered = parent_condition.apply(@rule_scope)
assert_equal 3, filtered.count
assert_equal 2, filtered.count
end
end