thesmallstar commented on pull request #1100: URL: https://github.com/apache/fineract/pull/1100#issuecomment-648076591
@vorburger I was a little worried about this approach though and thought of changing this to something more robust. The problem: We are checking count for the entries like this: Get me the count of audit trails whose resource-id is x it was activated and is of type client. Here, the same event can occur twice and hence two audits will be returned, which does not necessarily mean that the test failed(since we are checking count to be equal to one) The solution: Calculate the count before the action(create, update, activate) and check if count incremented by one, after the action. Why the old approach is still correct? Two reasons: Every entity is created for the first time, no action is performed twice. Just that I thought it was fundamentally wrong to check count to be one(not a general case), I hope I am not too confusing. Which approach will you prefer? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
