Unfortunately, most employers have the legal right to terminate employment at its will. This means they do not have to have good cause to justify a termination nor do they have to prove wrongdoing of any kind. However, if you were to file for unemployment benefits, the employer will have to prove to an administrative law judge their suspicions that you committed some form of misconduct was correct.
Now, if you belong to a union, just cause may need to be established. Also, if you suffer from a qualified disability which may be mistaken for illegal drug use, you may have some basis for a complaint. But other than, private employers are not required to be fair.
They say you get what you pay for, and this response is free, so take it for what it is worth. This is my opinion based on very limited information. My opinion should not be taken as legal advice. For true advice, we would require a confidential consultation where I would ask you questions and get your complete story. This is a public forum, so remember, nothing here is confidential. Nor am I your attorney. I do not know who you are and you have not hired me to provide any legal service. To do so would require us to meet and sign written retainer agreement. My responses are intended for general information only.
You have not stated any facts that indicate a legal violation has occurred. Labor Code 2922 provides that employment is "at will" absent an agreement to the contrary and, as such, may be terminated by employer or employee for just about any non-discriminatory reason, regardless of whether the basis is unfair or even completely false.
If you are a union member, your collective bargaining agreement may provide you with some additional rights and it would be wise to consult with your union rep to discuss that possibility. Based strictly on what you describe, however, an individual in your circumstance would not typically have any legal recourse.
This answer is a general interpretation of the law and is not fact specific to your case. Likewise it does not create an attorney-client relationship. You should seek an attorney for a review of your specific facts and documents.
Unless you had a contract or promise of continued employment, you were employed "at will" and can be fired for any lawful reason. Firing an "at will" employee for suspected drug use is lawful. But employers must be careful if they don't do a thorough investigation but give the employee a reason for the firing that harms the employee's professional reputation. More frequently, the law of defamation is being applied in termination lawsuits where the employer unwisely alleges what later proves to be an inaccurate reason for the firing because it can be foreseen the employee will be forced to repeat to prospective employers the reason for the firing. Repeating the harmful allegation hurts the employee's chances of getting another job. This is known as the "forced republication rule." You should apply for unemployment and consider consulting with a knowledgeable employment attorney about your situation. You may have to pay a modest fee for the legal consultation.
I enjoy answering questions on Avvo to try to help get you pointed in the right direction. But, I am not your attorney. Beware, my answers here are general, limited, incomplete, and can never be as complete, thorough, or accurate as one I would give to a client after hearing all of the facts and details of my client's situation and applying the correct law. Also, I am admitted to practice law only in California and all of my answers are intended exclusively for the Golden State.