I see nothing at all wrong with this law. Anyone applying for government aid (welfare, unemployment, food stamps, etc.) should be required to submit to a drug test prior to receiving that aid.
It's only logical and there's nothing unconstitutional about it. If you object to the test, then you simply don't receive the government aid. It's not like welfare, unemployment benefits, etc are constitutional rights; so no freedoms are being infringed upon.
Some might argue that there are people who depend on that money, but therein lies the problem. Nobody should depend on government handouts to survive. That gives the government way too much control over the life and death of its citizens - something that no government should have.