Did run a partial code coverage run today. Looks like we're around 60% code coverage with all tests (note: *code* coverage, not *test* coverage), which isn't that bad.

This is an incomplete list of things that are missing tests:

simplenews.mail.inc
- Call simplenews_add_node_to_spool with a node id (or drop this feature and enforce a $node object).
- Send a test mail to a mail address registered by a user.
- Test debugging
- Test failed sending, not sure how....
- Test check interval stuff (remaining run time checks)
- Test sending spool with only fails (the code there actually looks wrong..)
- Test simplenews_save_spool()
- Test simplenews_get_spool() when $status is not an array, range doesn't seem to be run, which is weird, and the unserialize($message->data) part
- test simplenews_count_spool() when $status is not an array. Actually, it looks like this can be removed with a simple $query->condition('status', $status) which will either do a = or an IN automatically.
- translated nodes in simplenews_send_status_update()
- unsubscribe mails, I think we have that covered somewhere in a new test

simplenews.source.inc:
- Trying to send a node that doesn't exist anymore. This will result in the also needed send fails..
- again translated nodes handling..
- receipt and priority headers
- i18n_select language selection
- sending mails to registered users (the user impersonating stuff)

More coming soon.

Comments

miro_dietiker’s picture

Issue tags: -test candidate

Also tests for the rule integration are missing.
#620498: Integration with Rules module

These are test candidates:
http://drupal.org/project/issues/search/simplenews?issue_tags=test%20can...

miro_dietiker’s picture

Issue tags: +test candidate

Tagging.