diff options
Diffstat (limited to 'config_test.go')
| -rw-r--r-- | config_test.go | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/config_test.go b/config_test.go new file mode 100644 index 0000000..a303719 --- /dev/null +++ b/config_test.go @@ -0,0 +1,36 @@ +package main + +import ( + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +const cfg string = ` +message: + from: foo@example.com + to: bar@example.com + subject: New SMS From {{.From}} For {{.To}} + template: | + From: {{.From}} + To: {{.To}} + Date: {{.DateReceived.UTC}} + + {{.Message}} + +smtp: + hostname: example.com:465 + username: bar + password: some password + +twilio: + address: /run/fwdsms/socket + authToken: some token + endpoint: / +` + +func TestConfig(t *testing.T) { + _, err := loadConfig(strings.NewReader(cfg)) + assert.NoError(t, err) +} |
