The rules vary from state to state and from company to company. In most cases, if a company wants to perform random drug testing of employees, and it’s in your hiring contract, they can do so under the law.