Not every programming class needs to, and a software engineering curriculum (which isn't the same thing as computer science) ought to include coursework <i>dedicated</i> to testing, but since its a key skill in constructing correct programs, introductory courses ought to include some testing (and some current ones, e.g., the MITx 6.002x class now running on EdX) do.
I agree, this is something that absolutely should be taught early on in programming classes. One side note, which a commenter pointed out on the actual post, is whether or not someone who is teaching programming will be viable to teach testing.
Regardless, it is something I'd like to see emphasized a bit more in all the code.org hype.