Skip to content

Commit

Permalink
fix: tests after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
theexiile1305 committed Oct 30, 2024
1 parent ee00ae2 commit e56a563
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions msgwriter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -620,15 +620,15 @@ func TestMsgWriter_writeBody(t *testing.T) {
buffer := bytes.NewBuffer(nil)
msgwriter.writer = buffer
message := testMessage(t)
msgwriter.writeBody(message.parts[0].writeFunc, NoEncoding)
msgwriter.writeBody(message.parts[0].writeFunc, NoEncoding, false)
if msgwriter.err != nil {
t.Errorf("writeBody failed to write: %s", msgwriter.err)
}
})
t.Run("writeBody on NoEncoding fails on write", func(t *testing.T) {
msgwriter.writer = failReadWriteSeekCloser{}
message := testMessage(t)
msgwriter.writeBody(message.parts[0].writeFunc, NoEncoding)
msgwriter.writeBody(message.parts[0].writeFunc, NoEncoding, false)
if msgwriter.err == nil {
t.Errorf("writeBody succeeded, expected error")
}
Expand All @@ -642,7 +642,7 @@ func TestMsgWriter_writeBody(t *testing.T) {
writeFunc := func(io.Writer) (int64, error) {
return 0, errors.New("intentional write failure")
}
msgwriter.writeBody(writeFunc, NoEncoding)
msgwriter.writeBody(writeFunc, NoEncoding, false)
if msgwriter.err == nil {
t.Errorf("writeBody succeeded, expected error")
}
Expand All @@ -653,7 +653,7 @@ func TestMsgWriter_writeBody(t *testing.T) {
t.Run("writeBody Quoted-Printable fails on write", func(t *testing.T) {
msgwriter.writer = failReadWriteSeekCloser{}
message := testMessage(t)
msgwriter.writeBody(message.parts[0].writeFunc, EncodingQP)
msgwriter.writeBody(message.parts[0].writeFunc, EncodingQP, false)
if msgwriter.err == nil {
t.Errorf("writeBody succeeded, expected error")
}
Expand All @@ -667,7 +667,7 @@ func TestMsgWriter_writeBody(t *testing.T) {
writeFunc := func(io.Writer) (int64, error) {
return 0, errors.New("intentional write failure")
}
msgwriter.writeBody(writeFunc, EncodingQP)
msgwriter.writeBody(writeFunc, EncodingQP, false)
if msgwriter.err == nil {
t.Errorf("writeBody succeeded, expected error")
}
Expand Down

0 comments on commit e56a563

Please sign in to comment.