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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | poll_js_add_choice.patch | 1.22 KB | benshell |
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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | poll_js_add_choice.patch | 1.22 KB | benshell |
Comments
Comment #1
benshell commentedHere's a patch to do basic testing that the request succeeds and returns valid JSON data.
Comment #2
chx commentedGreat! 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?
Comment #3
cwgordon7 commentedAlso this should go in modules/poll/poll.test rather than in modules/simpletest/tests/poll_js_add_choice.test.
Comment #4
chx commentedhttp://drupal.org/node/331708#comment-1160933