Skinner v. Railway Labor Executives Association, 489 U.S. 602 (1989), was the U.S. Supreme Court case that paved the way for random drug testing of public employees in "safety sensitive" positions.
The FRA also adopted regulations that authorized railroads to administer breath and urine drug tests to employees who violated safety rules.
At face value, random drug testing appears to be a violation of the Fourth Amendment, which protects the right of citizens "to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures."
In addition, the Fourth Amendment states that "no Warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized."
However, the United States Supreme Court ruled in Skinner that random drug testing is permissible for employees in safety sensitive positions.