wellcomecollection / catalogue-api

:crystal_ball: The API for searching the Wellcome Collection catalogue.
https://developers.wellcomecollection.org
MIT License
4 stars 0 forks source link

Add test to ensure sorting by score #680

Open paul-butcher opened 1 year ago

paul-butcher commented 1 year ago

Currently, we have no unit tests that ensure that query results are ordered by score.

When we have a query, results are to be noted by score and then id. However, all ordering tests pass even if score-based ordering is not included in the request.

I discovered this as I was working on converting Works Search to use a template. I had not yet added sorting, and the only two tests that failed with the new code were the date order ones.