This matter is regulated under Rhode Island law which says:
§ 28-6.5-1 Testing permitted only in accordance with this section. – (a) No employer or agent of any employer shall, either orally or in writing, request, require, or subject any employee to submit a sample of his or her urine, blood, or other bodily fluid or tissue for testing as a condition of continued employment unless that test is administered in accordance with the provisions of this section. Employers may require that an employee submit to a drug test if:
(1) The employer has reasonable grounds to believe based on specific aspects of the employee's job performance and specific contemporaneous observations, capable of being articulated, concerning the employee's appearance, behavior or speech that the employee's use of controlled substances is impairing his or her ability to perform his or her job;
(2) The employee provides the test sample in private, outside the presence of any person;
(3) Employees testing positive are not terminated on that basis, but are instead referred to a substance abuse professional (a licensed physician with knowledge and clinical experience in the diagnosis and treatment of drug related disorders, a licensed or certified psychologist, social worker, or EAP professional with like knowledge, or a substance abuse counselor certified by the National Association of Alcohol and Drug Abuse Counselors (all of whom shall be licensed in Rhode Island)) for assistance; provided, that additional testing may be required by the employer in accordance with this referral, and an employee whose testing indicates any continued use of controlled substances despite treatment may be terminated;
(4) Positive tests of urine, blood or any other bodily fluid or tissue are confirmed by a federally certified laboratory by means of gas chromatography/mass spectrometry or technology recognized as being at least as scientifically accurate;
(5) The employer provides the employee, at the employer's expense, the opportunity to have the sample tested or evaluated by an independent testing facility and so advises the employee;
(6) The employer provides the employee with a reasonable opportunity to rebut or explain the results;
(7) The employer has promulgated a drug abuse prevention policy which complies with requirements of this chapter; and
(8) The employer keeps the results of any test confidential, except for disclosing the results of a "positive" test only to other employees with a job-related need to know, and to defend against any legal action brought by the employee against the employer.
(b) Any employer who subjects any person employed by him or her to this test, or causes, directly or indirectly, any employee to take the test, except as provided for by this chapter, shall be guilty of a misdemeanor punishable by a fine of not more than one thousand dollars ($1,000) or not more than one year in jail, or both.
(c) In any civil action alleging a violation of this section, the court may:
(1) Award punitive damages to a prevailing employee in addition to any award of actual damages;
(2) Award reasonable attorneys' fees and costs to a prevailing employee; and
(3) Afford injunctive relief against any employer who commits or proposes to commit a violation of this section.
(d) Nothing in this chapter shall be construed to impair or affect the rights of individuals under chapter 5 of this title.
(e) Nothing in this chapter shall be construed to:
(1) Prohibit or apply to the testing of drivers regulated under 49 C.F.R. § 40.1 et seq and 49 C.F.R. part 382 if that testing is performed pursuant to a policy mandated by the federal government; or
(2) Prohibit an employer in the public utility or mass transportation industry from requiring testing otherwise barred by this chapter if that testing is explicitly mandated by federal regulation or statute as a condition for the continued receipt of federal funds.
(f) Notwithstanding the foregoing, this chapter shall not apply to members of the International Association of Bridge, Structural, Ornamental and Reinforcing Iron Workers and its signatory contractors jointly participating in the IMPACT National Substance Abuse Program for purposes of pre-qualifying workers for employment on and ensuring the maintenance of designated drug free work sites; provided, however, that:
(1) Participation by each worker is voluntary; and
(2) Workers who refuse to participate shall not be subjected to any adverse employment action other than an inability to work on a designated drug free work site; and
(3) The penalty for a first "positive" test shall not exceed a thirty (30) day suspension from work on designated drug free work sites.
So, the answer to your question is "yes" the employer can require the testing under these listed conditions.
My goal is to provide you with excellent service – if you feel you have gotten anything less, please reply back. I am happy to address follow-up questions. Thank you for your business!