Skip to content

Commit

Permalink
Fix typos: change "non-existant" to "non-existent"
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wneessen committed Nov 11, 2024
1 parent 79d4c6f commit c7438a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions msg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion smtp/smtp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c7438a9

Please sign in to comment.