Skip to content

test(customerpayment): non-finite cpayAmount rejection is unpinned #346

@CryptoJones

Description

@CryptoJones

The cpayAmountField schema applies .coerce.number().finite(). coerce turns the JSON string "Infinity" into a float, and a DOUBLE column would store it — poisoning every downstream sum / aging-bucket calculation.

The "accepts negative cpayAmount" test in customerpayment.test.js comments that the schema "blocks 0 and the infinities" — but only the zero case has an explicit test. injbAmount in invoicejob.test.js has the Infinity case covered; cpayAmount doesn't.

Fix: add POST + PATCH cases covering "Infinity" / "-Infinity" rejection. Mirrors invoicejob's coverage.

Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions