Test the logoutUser() function is called.