Download & Extend

TestingParty08: poll_choice_js()

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

Status:active» needs review

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

AttachmentSizeStatusTest resultOperations
poll_js_add_choice.patch1.22 KBIgnored: Check issue status.NoneNone

#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

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.

#4

Status:needs work» closed (duplicate)

http://drupal.org/node/331708#comment-1160933

nobody click here