Cannabis drug testing is used detect the presence of marijuana when injected or smoked. Elevated levels of urinary metabolites are found within hours of exposure and remain detectable for 3 to 10 days after smoking.