Closed Maroo-b closed 7 years ago
@b264 I added unit tests to the changes. I'm curious to know about the value of model association tests ? Do you often add association tests ?
@Maroo-b re: association tests - my 2 cents is that they have marginal utility during TDD but lose all value once code has been written
@NikitaAvvakumov thanks for the answer :) From my side I usually avoid adding tests for association because I have the feeling that I'm testing the framework, and in case I added them in strict TDD session I vote for removing them afterwards.
I updated the PR to calculate the balance from payment, and I didn't add the validation on Payment
destination FK because there is the case of withdrawal from sponsorship cashbox.
@NikitaAvvakumov validation for Payment
amount is added