1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 05:09:38 +02:00

Update error messages in Transfer model tests for clarity and conciseness
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions

This commit is contained in:
Josh Pigford 2025-04-30 14:45:39 -05:00
parent 47017a6432
commit 1aafed5f8b

View file

@ -39,7 +39,7 @@ class TransferTest < ActiveSupport::TestCase
transfer.save
end
assert_equal "Transfer must have different accounts", transfer.errors.full_messages.first
assert_equal "Must be from different accounts", transfer.errors.full_messages.first
end
test "Transfer transactions must have opposite amounts" do
@ -55,7 +55,7 @@ class TransferTest < ActiveSupport::TestCase
transfer.save
end
assert_equal "Transfer transactions must have opposite amounts", transfer.errors.full_messages.first
assert_equal "Must have opposite amounts", transfer.errors.full_messages.first
end
test "transfer dates must be within 4 days of each other" do
@ -71,7 +71,7 @@ class TransferTest < ActiveSupport::TestCase
transfer.save
end
assert_equal "Transfer transaction dates must be within 4 days of each other", transfer.errors.full_messages.first
assert_equal "Must be within 4 days", transfer.errors.full_messages.first
end
test "transfer must be from the same family" do
@ -90,7 +90,7 @@ class TransferTest < ActiveSupport::TestCase
)
assert transfer.invalid?
assert_equal "Transfer must be from the same family", transfer.errors.full_messages.first
assert_equal "Must be from same family", transfer.errors.full_messages.first
end
test "from_accounts converts amounts to the to_account's currency" do