-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemail_test.go
40 lines (32 loc) · 1019 Bytes
/
email_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package main
import "testing"
var testEamilParams = map[string]string{
"first": "bob",
"netid": "abc123",
"fqdn": "foo.bar.yale.edu",
"link": "https://127.0.0.1:8888/v1/renew",
"expire_on": "2018/01/14 15:32:24",
"spinupURL": "http://127.0.0.1:8888/spinup",
"spinupSiteURL": "http://127.0.0.1:8888/spinup",
}
func TestParseWarningTemplate(t *testing.T) {
out, err := ParseWarningTemplate(testEamilParams)
if err != nil {
t.Error("Failed to parse warning temapte", err)
}
t.Logf("Got parsed warning template: %s\n", out)
}
func TestParseRenewalTemplate(t *testing.T) {
out, err := ParseRenewalTemplate(testEamilParams)
if err != nil {
t.Error("Failed to parse warning temapte", err)
}
t.Logf("Got parsed warning template: %s\n", out)
}
func TestParseDecomTemplate(t *testing.T) {
out, err := ParseDecomTemplate(testEamilParams)
if err != nil {
t.Error("Failed to parse warning temapte", err)
}
t.Logf("Got parsed warning template: %s\n", out)
}