• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaMathias / moolah / 438d0c353976b21477dcfd74b4fbfd9cf497aed8
4%

Build:
DEFAULT BRANCH: main
Ran 05 Feb 2026 03:57PM UTC
Jobs 1
Files 135
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Feb 2026 03:52PM UTC coverage: 4.282% (+0.9%) from 3.34%
438d0c353976b21477dcfd74b4fbfd9cf497aed8

push

github

web-flow
Investment Transfers, Operations, and Currency Guardrails (#74)

* Create `ValidateHistoryCurrency` module for investment history validation

Adds the `Moolah.Finance.Validations.ValidateHistoryCurrency` module to ensure that investment history values use the same currency as the parent investment. The validation checks the currency of the `value` against the investment's `current_value` currency. If the investment cannot be loaded or the value is not a valid money struct, it returns `:ok`. Otherwise, it returns an error if the currencies do not match, providing a descriptive message.

* Create `ValidateOperationCurrency` module for investment operation currency validation

Ensures that the operation value currency matches the currency of the parent investment. The module loads the investment using `investment_id` and compares the operation `value` currency against the investment's `current_value` currency. Returns `:ok` if the currencies align or if the investment cannot be loaded. Returns an error message if the currencies differ, indicating that the currency must match the investment currency.

* Create `ValidateTransactionInvestmentTarget` module for transfer transaction validation

This module validates that transfer transactions target a valid investment when an investment account is involved. It enforces the following behaviors:
1. `target_investment_id` is only allowed for `:transfer` transactions.
2. If a transfer involves an investment account, `target_investment_id` is required.
3. The selected investment must belong to the investment account involved in the transfer.

The validation returns `:ok` when account or investment lookups fail, allowing relationship validations to handle missing data.

* Create `CreateInvestmentOperationFromTransaction` module for investment operation creation

Adds functionality to create investment operations for transfer transactions involving investment accounts. This module runs after a transaction is created... (continued)

111 of 114 new or added lines in 5 files covered. (97.37%)

470 of 10977 relevant lines covered (4.28%)

1.15 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
92.86
lib/moolah/finance/changes/create_investment_operation_from_transaction.ex
Jobs
ID Job ID Ran Files Coverage
1 438d0c353976b21477dcfd74b4fbfd9cf497aed8.1 05 Feb 2026 03:57PM UTC 135
4.28
GitHub Action Run
Source Files on build 438d0c353976b21477dcfd74b4fbfd9cf497aed8
  • Tree
  • List 135
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 438d0c35 on github
  • Prev Build on main (#48F2CA0F...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc