It wouldn't happen that way in the real world. In the real world, it would be a positive test along with behavior that deems the employee unfit for duty. Now, I also happen to believe that workplaces should have substance abuse policies that are supportive, not just punitive. Anyone can fuck up, if someone pops positive, get them to EAP and link them up with resources and get them some help. I don't think employers SHOULD fire them on the spot, but the law says they can.
I also know that employers are risk averse and can understand why they would want to terminate someone who is coming to work positive for drugs. That is a potential workplace safety issue that can be VERY costly.
My dad is a safety director for a large employer so I have a bit of a window into these issues.