1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

Hide envelope, use Part.Content for #85

This commit is contained in:
James Hillyerd
2018-03-20 17:55:43 -07:00
parent 6d250a47b4
commit e7a86bd8f8
5 changed files with 65 additions and 36 deletions

View File

@@ -172,8 +172,8 @@ func TestRestMessage(t *testing.T) {
}
// Test JSON message headers
msg1 := &message.Message{
Metadata: message.Metadata{
msg1 := message.New(
message.Metadata{
Mailbox: "good",
ID: "0001",
From: &mail.Address{Name: "", Address: "from1@host"},
@@ -181,7 +181,7 @@ func TestRestMessage(t *testing.T) {
Subject: "subject 1",
Date: time.Date(2012, 2, 1, 10, 11, 12, 253, time.FixedZone("PST", -800)),
},
Envelope: &enmime.Envelope{
&enmime.Envelope{
Text: "This is some text",
HTML: "This is some HTML",
Root: &enmime.Part{
@@ -191,7 +191,7 @@ func TestRestMessage(t *testing.T) {
},
},
},
}
)
mm.AddMessage("good", msg1)
// Check return code