Add tests to email, api, markets. #ref 302