For an employee to win a discrimination lawsuit, he has to show that he was qualified for the job he held. Some employers assume that if they disciplined the employee for poor performance, that proves he wasn’t qualified. But a court might not see it that way if you trained and tested him before putting him to work.