Create database query that returns records that have expired but not marked expired
see: https://sequel.jeremyevans.net/rdoc/classes/Sequel/Dataset.html for help with the query
see: https://devhints.io/sequel (Filtering section) for other hints/ideas
Acceptance Criteria:
-
A class method is added to MediaResources
Sequel
model which is a query that:-
Searches for items with an end_date
that is before today's date AND -
Does not already have the expired
flag via #88 (closed) set totrue
-
-
Unit tests added to the MediaResources
spec file that demonstrate the query catching records that need to be expired, ignoring records already expired, ignoring records that don't have anend_date
that qualifies as expired, etc.
Edited by Matt Critchlow