We need to test the poll module's AHAH callback for adding a new choice.

Suggested assertions:
- When a proper POST request is performed, the proper json data is outputted.

CommentFileSizeAuthor
#1 poll_js_add_choice.patch1.22 KBbenshell

Comments

benshell’s picture

Status: Active » Needs review
StatusFileSize
new1.22 KB

Here's a patch to do basic testing that the request succeeds and returns valid JSON data.

chx’s picture

Great! Our first JSON test. Love it. Can we make it even better by asserting that the data is what we want? Just some preg or raw checks for the name of the fields?

cwgordon7’s picture

Status: Needs review » Needs work

Also this should go in modules/poll/poll.test rather than in modules/simpletest/tests/poll_js_add_choice.test.

chx’s picture

Status: Needs work » Closed (duplicate)