https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21503 --- Comment #18 from Christopher Brannon <cbrannon@cdalibrary.org> --- (In reply to Jonathan Druart from comment #16)
Created attachment 80601 [details] [review] Bug 21503: Tests cleanup and highlight a missing case
This patch does the following changes: - Use build_object to create the MSS - Store the generate AVs. That was not the case before and so we were not testing the right things - Split the tests into 2 parts: staff and OPAC, for readability - Update the tests' descriptions - Highlight a problem: If descriptions are missing for both OPAC and staff, undef is returned. Is that what we expect? It seems that it is not what were expecting the tests.
Perhaps the problem was with the fact that we weren't testing the right things? I could not get a test cast to return null or empty if the authorised_value didn't exist. It seemed to always return the authorised_value if there was nothing eles. I assumed it was the non-existant parameter being searched, and so I left it at that. Thank you for your help. This is the firt time I've touched a unit test. I think the expectation is that if there are no descriptions, then the authorised_value is displayed. If there is no av, then it should either return the parameter that was searched or be blank. Not sure which. -- You are receiving this mail because: You are watching all bug changes.