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.
This commit is contained in:
Winni Neessen 2024-11-11 20:07:55 +01:00
parent 79d4c6fd07
commit c7438a974c
Signed by: wneessen
GPG key ID: 385AC9889632126E
2 changed files with 5 additions and 5 deletions

View file

@ -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.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() message := NewMsg()
if message == nil { if message == nil {
t.Fatal("message is nil") t.Fatal("message is nil")
} }
message.AttachFile("testdata/non-existant-file.txt") message.AttachFile("testdata/non-existent-file.txt")
attachments := message.GetAttachments() attachments := message.GetAttachments()
if len(attachments) != 0 { if len(attachments) != 0 {
t.Fatalf("failed to retrieve attachments list") 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.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() message := NewMsg()
if message == nil { if message == nil {
t.Fatal("message is nil") t.Fatal("message is nil")
} }
message.EmbedFile("testdata/non-existant-file.txt") message.EmbedFile("testdata/non-existent-file.txt")
embeds := message.GetEmbeds() embeds := message.GetEmbeds()
if len(embeds) != 0 { if len(embeds) != 0 {
t.Fatalf("failed to retrieve attachments list") t.Fatalf("failed to retrieve attachments list")

View file

@ -1492,7 +1492,7 @@ func TestNewClient(t *testing.T) {
t.Run("new client via Dial fails on server not started", func(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)) _, err := Dial(fmt.Sprintf("%s:%d", TestServerAddr, 64000))
if err == nil { 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) { t.Run("new client fails on server not available", func(t *testing.T) {