The 4th Amendment argument is bull shit. While I am in total support of the Constitution, I can not support the courts decision. Yes search and seizure without a warrant is a Right, however, getting free money from the .gov is not. It should be in order to partake in welfare you must be willing to agree to certain terms, one of which being random drug testing.
Since welfare isn't a Right, those terms can be anything. If you want to hold stead fast to your 4th Amendment Right, then go ahead, the .gov doesn't need to shit for you. But, if you decide you need to mooch off of society, then suck it up and go with the terms of agreement.