This is not C. Returning -1 is counter-intuitive and will lead to data problems unless it is explicitly dealt with everywhere this is touched.
Orders with no payments show ammount_paid==0
Seems very rational. What was I thinking?
Thanks a lot!
Yeah so actually, this is not C: we have unit tests :)
And this change breaks the test suite.
Alter test for amount_paid: never return -1
Overpaid is still paid.
Changes the test for whether something has been paid for to allow for overpayment.
So I've updated the only test I could see that would fail due to changes. Please let me know if it works for you.
Well, here is how to test that your branch works: ./runtests.sh
If you see a F in there (like with your latest commits), it means the suite fails.
So yeah, it still fails.
fixed api tests for #171