mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-22 13:50:49 +01:00
#42: Add test for Msg.EnvelopeFromFormat
This commit is contained in:
parent
fa4eca20f1
commit
333c3970e7
1 changed files with 5 additions and 1 deletions
|
@ -617,7 +617,7 @@ func TestMsg_SetMessageIDWithValue(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
// TestMsg_FromFormat tests the FromFormat() method for the Msg object
|
||||
// TestMsg_FromFormat tests the FromFormat and EnvelopeFrom methods for the Msg object
|
||||
func TestMsg_FromFormat(t *testing.T) {
|
||||
tests := []struct {
|
||||
tname string
|
||||
|
@ -641,6 +641,10 @@ func TestMsg_FromFormat(t *testing.T) {
|
|||
t.Errorf("failed to FromFormat(): %s", err)
|
||||
return
|
||||
}
|
||||
if err := m.EnvelopeFromFormat(tt.name, tt.addr); err != nil && !tt.fail {
|
||||
t.Errorf("failed to EnvelopeFromFormat(): %s", err)
|
||||
return
|
||||
}
|
||||
|
||||
var fa *mail.Address
|
||||
f, ok := m.addrHeader[HeaderFrom]
|
||||
|
|
Loading…
Reference in a new issue