Added tests and corrected indentation of updateUser