GHOP #164 Create tests for comment module

chx - January 20, 2008 - 17:46
Project:SimpleTest
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

* Set up comments without a subject. Check that the subject field is not there.
* Set up comments to have a subject. Preview, submit, reply, edit, delete a comment. Check the reply is gone too.
* Set Preview comment to required. check that it is indeed required.
* Check both locations of the comment submission form work: the form and submissions works.
* Check all three options of anonymous commenting: leave comments with or without contact information as appropriate
* Check admin/content/comment and admin/content/comment/approval for correctness: publish / unpublish / delete a comment. Post a comment with a user that has no "post comments without approval" only "post comments" and check the comment is not visible for other users. Approve it and see it is.

#1

boombatower - January 21, 2008 - 06:56
Status:active» needs review

I believe this beast is working.

AttachmentSizeStatusTest resultOperations
comment_module.test_.txt11.86 KBIgnoredNoneNone

#2

kourge - January 21, 2008 - 06:58
Title:GHOP #164 Create tests for comemnt module» GHOP #164 Create tests for comment module

#3

webchick - January 21, 2008 - 08:10
Status:needs review» needs work

- // $Id: should be // $Id$
- Your test needs a description more descriptive than "..." :)
- No need to override tearDown if you're not actually performing tearDown tasks.
- Instead of set_comment_settings business, I'd just do a plain $this->variableSet(); for those form values. This has the advantage of cleaning up after your test so you don't permanently alter the state of the database.
- Let's get some Doxygen comments on those functions, hmm? ;)
- I wonder if these should be broken up a little into different test* functions, rather than all chunked under testComment. That's a /long/ function. Is there a nice place to split up the functionality? (ex: testEdit, testAnonymous, testDelete, test...)

Sorry, I'm too tired to do a more thorough functionality review, atm. Will leave to chx/Zlender.

#4

boombatower - January 21, 2008 - 18:23

Summary:

  • Fixed $Id.
  • Forgot about that. I usually leave that till last so I can make it most accurate. Fixed.
  • Was told that I needed that regardless by cwgordon7. Removed.
  • Changed.
  • Yea the Doxygen was intended to be filled out just figured that some other changes would be found so I would give you guys the most time to see it. Sorry, fixed.
  • Possible later is what chx said.

Thanks for reviewing it.

AttachmentSizeStatusTest resultOperations
comment_module.test_.txt13.46 KBIgnoredNoneNone

#5

webchick - January 21, 2008 - 18:47
Status:needs work» needs review

Marking back for review.

#6

boombatower - January 21, 2008 - 20:41

I believe I successfully split up tasks.

AttachmentSizeStatusTest resultOperations
comment_module.test_.txt14.04 KBIgnoredNoneNone

#7

Rok Žlender - January 21, 2008 - 21:59
Status:needs review» reviewed & tested by the community

Tests looks great. I went over the code and couldn't find any problems. Tomorrow I'll try running the test and will commit afterwards. This is amazing test thanks boombatower.

#8

Rok Žlender - March 7, 2008 - 18:04

Committed to D6 branch now testing for head.

#9

Rok Žlender - March 7, 2008 - 18:26
Status:reviewed & tested by the community» fixed

Committed to HEAD.

#10

Anonymous (not verified) - March 21, 2008 - 18:31
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.