From 29794fd6ad5167bdd7d334bec8960dabe77577df Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Mon, 11 Nov 2024 20:08:58 +0100 Subject: [PATCH] Fix typo in Content-Disposition header in tests Corrected multiple instances of the misspelled "Content-Dispositon" to "Content-Disposition" in the msgwriter_test.go file. This ensures that the error messages in the tests are accurate and improve code readability. --- msgwriter_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/msgwriter_test.go b/msgwriter_test.go index 330507b..1b2a254 100644 --- a/msgwriter_test.go +++ b/msgwriter_test.go @@ -324,7 +324,7 @@ func TestMsgWriter_addFiles(t *testing.T) { } } if !strings.Contains(buffer.String(), `Content-Disposition: attachment; filename="attachment.txt"`) { - t.Errorf("Content-Dispositon header not found for attachment. Mail: %s", buffer.String()) + t.Errorf("Content-Disposition header not found for attachment. Mail: %s", buffer.String()) } switch runtime.GOOS { case "freebsd": @@ -357,7 +357,7 @@ func TestMsgWriter_addFiles(t *testing.T) { } } if !strings.Contains(buffer.String(), `Content-Disposition: attachment; filename="attachment"`) { - t.Errorf("Content-Dispositon header not found for attachment. Mail: %s", buffer.String()) + t.Errorf("Content-Disposition header not found for attachment. Mail: %s", buffer.String()) } if !strings.Contains(buffer.String(), `Content-Type: application/octet-stream; name="attachment"`) { t.Errorf("Content-Type header not found for attachment. Mail: %s", buffer.String()) @@ -383,7 +383,7 @@ func TestMsgWriter_addFiles(t *testing.T) { } } if !strings.Contains(buffer.String(), `Content-Disposition: attachment; filename="attachment.txt"`) { - t.Errorf("Content-Dispositon header not found for attachment. Mail: %s", buffer.String()) + t.Errorf("Content-Disposition header not found for attachment. Mail: %s", buffer.String()) } if !strings.Contains(buffer.String(), `Content-Type: application/octet-stream; name="attachment.txt"`) { t.Errorf("Content-Type header not found for attachment. Mail: %s", buffer.String()) @@ -402,7 +402,7 @@ func TestMsgWriter_addFiles(t *testing.T) { t.Errorf("attachment not found in mail message. Mail: %s", buffer.String()) } if !strings.Contains(buffer.String(), `Content-Disposition: attachment; filename="attachment.txt"`) { - t.Errorf("Content-Dispositon header not found for attachment. Mail: %s", buffer.String()) + t.Errorf("Content-Disposition header not found for attachment. Mail: %s", buffer.String()) } switch runtime.GOOS { case "freebsd": @@ -438,7 +438,7 @@ func TestMsgWriter_addFiles(t *testing.T) { } } if !strings.Contains(buffer.String(), `Content-Disposition: attachment; filename="attachment.txt"`) { - t.Errorf("Content-Dispositon header not found for attachment. Mail: %s", buffer.String()) + t.Errorf("Content-Disposition header not found for attachment. Mail: %s", buffer.String()) } switch runtime.GOOS { case "freebsd": @@ -478,7 +478,7 @@ func TestMsgWriter_addFiles(t *testing.T) { } } if !strings.Contains(buffer.String(), `Content-Disposition: attachment; filename="attachment.txt"`) { - t.Errorf("Content-Dispositon header not found for attachment. Mail: %s", buffer.String()) + t.Errorf("Content-Disposition header not found for attachment. Mail: %s", buffer.String()) } switch runtime.GOOS { case "freebsd":