aboutsummaryrefslogtreecommitdiff
path: root/mailer_test.go
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2023-08-13 14:02:59 +0100
committerGrégoire Duchêne <gduchene@awhk.org>2023-08-13 14:06:39 +0100
commit1e6fd3c1dd03f52137205f3e66f6dee20ac4fe17 (patch)
treef6e9f6305e0034ac430cb7f3f5ea1d14d8acd511 /mailer_test.go
parenta7b06fd8c650faa4b272625eb9607749c52ec6f5 (diff)
Switch to go.awhk.org/core for testing
Diffstat (limited to 'mailer_test.go')
-rw-r--r--mailer_test.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/mailer_test.go b/mailer_test.go
index e1376c3..7da07ae 100644
--- a/mailer_test.go
+++ b/mailer_test.go
@@ -8,12 +8,15 @@ import (
"testing"
"time"
- "github.com/stretchr/testify/assert"
+ "github.com/google/go-cmp/cmp"
+ "go.awhk.org/core"
"go.awhk.org/fwdsms/pkg/twilio"
)
-func TestMailer_newEmail(t *testing.T) {
+func TestMailer_newEmail(s *testing.T) {
+ t := core.T{T: s, Options: []cmp.Option{cmp.AllowUnexported(email{})}}
+
m := newMailer(&Config{
Message: Message{
From: "fwdsms@example.com",
@@ -48,5 +51,5 @@ Hello World!`,
"",
}, "\r\n")),
}
- assert.Equal(t, wants, m.newEmail(sms))
+ t.AssertEqual(wants, m.newEmail(sms))
}