LearnBoost / tobi

Tobi: Expressive server-side functional testing with jQuery
408 stars 33 forks source link

process body for all pages apart from redirects so body of 404 and other errors may be parsed #57

Closed psd closed 13 years ago

psd commented 13 years ago

Currently only the body for a 200 request is processed and returned as a context meaning it is not possible to process the contents of a 404 error page, or login/registration forms returned with a status of 400 or 422, rather than 200 OK status.

This was raised as issue#56

This patch handles "redirect" status responses before receiving and parsing the data for all other response codes.

It passes all of the current tests as well as the new 404 test page.

tj commented 13 years ago

my bad, didn't see this pull-request, patched it