BTBurke / twilio-voice

A Google Voice-like service you can run yourself with Twilio
MIT License
90 stars 8 forks source link

Config coverage and bug fixes #1

Closed ivy closed 7 years ago

ivy commented 7 years ago

Today I bootstrapped a Ginkgo test suite to cover the various edge cases when validating the configuration. In the process of writing the tests however, I discovered and fixed a small bug in the way VoicemailFile is validated. When it's blank or points to a directory, it's mistaken for a real, existing file (in the case of a blank filename, fullVoicemailPath expands to the working directory).

The fix is to test if VoicemailFile is a directory. This has also has the side-effect of fixing the failing test case for a blank filename.

BTBurke commented 7 years ago

Thanks for the contribution!