Fixed httpsRedirect in unit tests and added the condition statement I missed before. Whoops\!