Fix email task tests