I've been kind of curious about this. If you test positive at work for MJ but you can prove you partook while you were in Colorado, where it's legal, can your employer fire you for doing something that was legal in the jurisdiction you were in at the time? I recognize that it would still be illegal under federal law, but from what I can tell the feds are taking a hands-off position on this.
Yes, it is in the contract for employment. It has nothing to do with legality. Just the same as if I get tested and I was out drinking until very late and I tested positive for alcohol I could get fired then too despite it being completely legal (and still able to do my job and not be a hazard to the workplace).
Drug testing at work is so goddamn ridiculous. It's none of their damn business.
I understand it for some positions at my company, but for me it makes no sense. There are union employees at my company that do very specialized things that could kill them and others so they company doesn't want that to happen for various reasons you could guess. Basically management had random drug testing as part of the union contract and naturally in order to agree to it all management and corporate employees had to agree to it as well. Just another bullshit union story really.