usdigitalresponse/cpf-reporter

Add missing unit tests for getValidUploads function

Opened this issue · 0 comments

See #470

An existing branch and draft pull requests already for this issue. The goal is to complete this draft PR and get it ready for review with all tests passing.

The cases needed to be tested are:

  1. When an upload was first validated and subsequently invalidated then it should be ignored.
  2. When an upload was first invalid and subsequently became valid then it should be included.
  3. When an upload has multiple valid UploadValidation records it should be included.
  4. When an upload only has a single valid UploadValidation record it should be included.
  5. When an upload only has a single invalid UploadValidation record it should be ignored.