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

benshell - October 12, 2008 - 03:30
Status:active» needs review

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

AttachmentSize
poll_js_add_choice.patch 1.22 KB

#2

chx - October 12, 2008 - 15:23

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

cwgordon7 - October 12, 2008 - 21:06
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

chx - December 18, 2008 - 12:49
Status:needs work» duplicate

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

 
 

Drupal is a registered trademark of Dries Buytaert.