The API needs the id of the user, not the id of the invite. The problem with the tests is that the update mock returned a different user ID than the user it was being passed. So the tests didn’t catch this.