Posted by cwgordon7 on August 16, 2008 at 2:18am
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | tests |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
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.
Comments
#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