The SimpleTest framework in Drupal lets you define tests for modules.

This issue is to track progress on adding SimpleTest tests to the Search by Page module.

Comments

jhodgdon’s picture

Status: Active » Fixed

Basic tests have now been added to this module. Checked into the development version on 6.x-1.x branch (available for download within 24 hours, or by CVS now).

jhodgdon’s picture

I added some more tests today (in the 6.x-1.x development branch, available for download within 24 hours, or by CVS now).

These are tests for access control: verifying that if you have some "private" nodes, that privileged users can see them in search results, and non-privileged users cannot.

jhodgdon’s picture

Status: Fixed » Needs work

I think I will reopen this issue, because I really should add some tests for the Search by Page Users, Paths, and Files modules (currently it is only testing Nodes).

Also, I should probably test that content types that are not selected do not show up in search results (currently it is only testing that content does show up in search, and that access permissions are respected).

jhodgdon’s picture

Assigned: Unassigned » jhodgdon
jhodgdon’s picture

Tests have now been added to the 6.x-1.x-dev branch for Users and Paths. Also added content type testing to Nodes tests, and new tests for display of nodes in search results as teasers vs. excerpts.

So the only thing remaining is to figure out how to test the Attachment module.

jhodgdon’s picture

Tests so far are now in the 6.x-1.5 release. Still need tests for Attachments sub-module.

jhodgdon’s picture

I just checked into the development branch some tests for the Attachments sub-module. These tests use the Uploads module.

Remaining to do: test Attachments using a CCK filefield field.

jhodgdon’s picture

Version 6.x-1.6 of Search by Page contains the tests thus far. Still need to create a test for Attachments using CCK FileField.

jhodgdon’s picture

Status: Needs work » Fixed

I have finally finished writing the tests! In the process, I found a bug in the Attachments module and fixed it, so this fix and all the tests are about to be released as version 6.x-1.7.

Bug found: #650640: SBP Attach sometimes searches files it shouldn't

Status: Fixed » Closed (fixed)

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