Unit tests should accompany this module to ensure the API is working as intended. I have put together the beginning of a test suite for votingapi.

CommentFileSizeAuthor
votingapi_simpletest.patch8.29 KBpaul.lovvik

Comments

webchick’s picture

Status: Needs review » Needs work

class ErrorDetector seems out of place here, and is possibly something that should be added to drupal_web_test_case.php in simpletest module, if something similar isn't already provided in SimpleTest (seems like it would be; check first).

If it must be here, you should at least namespace it with VotingAPI so that we don't get into naming collisions down the road.

eaton’s picture

Status: Needs work » Fixed

A modified version of the patch has been checked in. It also helped flush out a tricky bug when inserting votes with minimal data. Thanks, paul!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.