baudehlo/Haraka — pull request #521 by msimerson (2014-03-22 23:25:58+00:00)
Title: SPF: results. tests. slimmed down by trimming duplicated code.

1. added results
2. refactored to remove very large duplicated select / case
3. added tests
4. added boolean config declarations

% ./run_tests	tests/plugins/spf.js
Running tests: [ 'tests/plugins/spf.js' ]

spf.js
✔ return_results - result, none
✔ return_results - result, neutral
✔ return_results - result, pass
✔ return_results - result, softfail, reject=false
✔ return_results - result, softfail, reject=true
✔ return_results - result, fail, reject=false
✔ return_results - result, fail, reject=true
✔ return_results - result, temperror, reject=false
✔ return_results - result, temperror, reject=true
✔ return_results - result, permerror, reject=false
✔ return_results - result, permerror, reject=true
✔ return_results - result, unknown
✔ hook_mail - rfc1918
✔ hook_mail - no txn
✔ hook_mail - txn, no helo

OK: 15 assertions (163ms)