TestingParty08: poll_choice_js()
cwgordon7 - August 16, 2008 - 02:18
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | tests |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | duplicate |
Description
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.

#1
Here's a patch to do basic testing that the request succeeds and returns valid JSON data.
#2
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?
#3
Also this should go in modules/poll/poll.test rather than in modules/simpletest/tests/poll_js_add_choice.test.
#4
http://drupal.org/node/331708#comment-1160933