From c7438a974cf8e3fac2119bec19da28c899907990 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Mon, 11 Nov 2024 20:07:55 +0100 Subject: [PATCH] Fix typos: change "non-existant" to "non-existent" Corrected multiple instances of the word "non-existant" to "non-existent" in test descriptions to improve code clarity and accuracy. This change affects both smtp_test.go and msg_test.go files. --- msg_test.go | 8 ++++---- smtp/smtp_test.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/msg_test.go b/msg_test.go index ce98447..3f2cf94 100644 --- a/msg_test.go +++ b/msg_test.go @@ -4527,12 +4527,12 @@ func TestMsg_AttachFile(t *testing.T) { t.Errorf("expected message body to be %s, got: %s", "This is a test attachment", got) } }) - t.Run("AttachFile with non-existant file", func(t *testing.T) { + t.Run("AttachFile with non-existent file", func(t *testing.T) { message := NewMsg() if message == nil { t.Fatal("message is nil") } - message.AttachFile("testdata/non-existant-file.txt") + message.AttachFile("testdata/non-existent-file.txt") attachments := message.GetAttachments() if len(attachments) != 0 { t.Fatalf("failed to retrieve attachments list") @@ -4997,12 +4997,12 @@ func TestMsg_EmbedFile(t *testing.T) { t.Errorf("expected message body to be %s, got: %s", "This is a test embed", got) } }) - t.Run("EmbedFile with non-existant file", func(t *testing.T) { + t.Run("EmbedFile with non-existent file", func(t *testing.T) { message := NewMsg() if message == nil { t.Fatal("message is nil") } - message.EmbedFile("testdata/non-existant-file.txt") + message.EmbedFile("testdata/non-existent-file.txt") embeds := message.GetEmbeds() if len(embeds) != 0 { t.Fatalf("failed to retrieve attachments list") diff --git a/smtp/smtp_test.go b/smtp/smtp_test.go index 931b74e..1b616fc 100644 --- a/smtp/smtp_test.go +++ b/smtp/smtp_test.go @@ -1492,7 +1492,7 @@ func TestNewClient(t *testing.T) { t.Run("new client via Dial fails on server not started", func(t *testing.T) { _, err := Dial(fmt.Sprintf("%s:%d", TestServerAddr, 64000)) if err == nil { - t.Error("dial on non-existant server should fail") + t.Error("dial on non-existent server should fail") } }) t.Run("new client fails on server not available", func(t *testing.T) {