hackerAPI
hackerAPI copied to clipboard
Fix unit tests
Currently some unit tests are failing, we should investigate and fix them as necessary.
Seems there are a few commits that have caused the unit tests to break. I'll list them and what I've been able to gather.
- e045828: Introducing
secureoption causes authentication issues with passport and chai during unit tests. Resolution:secureshould be true in non-test environments (i.e.,secure: !Services.env.isTest() - 01aec67: Some validation left out when introducing accommodation reason (i.e., no upper limit on amount any more). Renaming of field ("application.accommodation.travel" => "application.accomodation.travel.amount") caused issues with tests. Resolution: rename validation fields in tests and remove test against upper limit validation.
- 2e3fd15: Disabling this validation led to some issues in tests that are expected to fail if the hacker's account is not confirmed. Resolution: Re-enable the validation.
- a5e29a2: Same as above. Resolution: Same as above.
Resolved through #926.