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:
parent
eabacb2d01
commit
edfa7726be
2 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue