It depends how desperate the candidate is for a job. A coding assignment may have a hidden cost of filtering out many qualified candidates, if qualified candidates don't feel the need to apply to companies with these assignments. Anecdotally, these assignments seem like just another filter companies use, they don't replace any steps in the process, just one more hurdle to pass.
If you aren't willing to demonstrate your skills with a little coding assignment, I don't consider you a qualified candidate. I've used a coding test for years, always get exactly the good kind of people I want, it filters out the lazy and the liars, most programming candidates are liars and simply don't have the chops they claim.