Automattic/jetpack — pull request #675 by rase- (2014-06-07 10:20:12+00:00)
Title: Contact Forms: Added some tests

Added some tests to see that that submitted contact form data is
* Sent as email properly
* Handled properly when spam
* Stored in the post content expectedly (important for search)
* Stored in metadata expectedly
* Deleted when old spam

The tests will be helpful for at least two very distinct purposes:
* When a feature/bugfix is made, it can be easily validated if the stored data has actually changed
* With better test coverage refactoring or rewriting the Contact Forms codebase will be easier due to the ability to constantly validate if things are still working essentially the same way.

The tests are currently testing the entire process of contact for submission processing, but if the codebase is refactored we can add unit tests for the resulting smaller pieces.

I'll be adding more tests gradually.