I'm planning on working on this but wanted to get advice on what you think would be worth testing.

I was planning to test

  • that each of the permissions behaves as expected.
  • that a default format works for an authenticated user
  • test the settings works for comments vs. nodes

Anything else that seems particularly worth testing?

Files: 
CommentFileSizeAuthor
#3 better_formats.test5.17 KBgreggles

Comments

Version:6.x-1.1-rc2» 6.x-1.1

I think that would be the major cases. There would be some minor cases like checking if user text is used for "Input formats" and "More information about input formats". The rest of the functionality lies in the permission system and should be good as long as the permission system is good.

I admitingly did not build the module with an eye at testing as I should have. So I would love feedback from your efforts, if there are ways to make the module more test friendly, I would be willing to make such changes.

Thank you for the effort in this much needed area.

Some other tests that would be nice would be testing of not just the correct default but testing the fail over default system as well. Those are more of the edge cases but it would be great to get them into tests at some point.

Status:Active» Needs review
StatusFileSize
new5.17 KB

Well, refactoring from writing tests usually happens with unittests - not functional tests - and most of the simpletests (including those I'm writing) are functional tests.

Edge cases are definitely good things to test since it's easy to miss them when you do manual testing.

I'm motivated primarily by how we're using this on a project, so that's what I'm focusing on ;) But of course once this is in place it should be easier for others to enhance the tests to cover more edge cases.

Here's the file and they all pass now. Let me know what you think. It's not really an exhaustive test (I only test the impact on anonymous), but it works...

Title:create simpletests for better formats modulecreate simpletests
Status:Needs review» Needs work

Committed tests in #3.

Changing to 'needs work' and leaving open to use this issue for further test development.