You need to speak with an attorney who handles CPS defense cases, immediately.
The CPS social worker wanted to come into your house and take pictures and interview your children in order to find evidence against you. They want you to take a drug test immediately in order to find evidence against you. You have the right to refuse to allow the CPS social worker into your home, you can refuse to allow them to speak to your children, and you have the right to refuse to take a drug test. (You cannot refuse to allow CPS personnel into your home if they have a warrant to search your home. If this is the case, they will show up with a law enforcement officer.)
If CPS hasn't taken your children away from you yet, it is because they do not have enough evidence against you. You should not help CPS gather evidence against you, instead you should hire an attorney to represent you and to handle all communications with CPS until your case is dismissed.
In addition to the information provided in the other answer, be aware that CPS (or other law enforcement) can question your children without your permission or knowledge. They can go to the school and request that your child be brought to them for questioning.
With regard to the drug test, if you can pass it, you should take it. Your failure to cooperate will keep CPS in your life longer, looking for you to mess up so they can take your children.