Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: prepare 061 release #418

Merged
merged 3 commits into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ package mail

// VERSION indicates the current version of the package. It is also attached to the default user
// agent string.
const VERSION = "0.6.0"
const VERSION = "0.6.1"
2 changes: 1 addition & 1 deletion msg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5890,7 +5890,7 @@ func TestMsg_WriteTo(t *testing.T) {
t.Error("expected message to have multipart/related in mail body")
}
if !strings.Contains(buffer.String(), "embed.txt") {
t.Error("expected message to have embeded file in mail body")
t.Error("expected message to have embedded file in mail body")
}
})
t.Run("WriteTo with S/MIME signing fails with invalid key", func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion senderror_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func TestSendError_errorCode(t *testing.T) {
}
})
t.Run("errorCode with wrapper error", func(t *testing.T) {
code := errorCode(fmt.Errorf("an error occured: %w", errors.New("443 4.1.0 Server currently unavailable")))
code := errorCode(fmt.Errorf("an error occurred: %w", errors.New("443 4.1.0 Server currently unavailable")))
if code != 443 {
t.Errorf("expected error code: %d, got: %d", 443, code)
}
Expand Down
28 changes: 14 additions & 14 deletions smtp/smtp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ func TestPlainAuth(t *testing.T) {
}
_, err = auth.Next([]byte("nonsense"), true)
if err == nil {
t.Fatal("expected second server challange to fail")
t.Fatal("expected second server challenge to fail")
}
if !errors.Is(err, ErrUnexpectedServerChallange) {
t.Errorf("expected error to be: %s, got: %s", ErrUnexpectedServerChallange, err)
Expand Down Expand Up @@ -537,7 +537,7 @@ func TestPlainAuth_noEnc(t *testing.T) {
}
_, err = auth.Next([]byte("nonsense"), true)
if err == nil {
t.Fatal("expected second server challange to fail")
t.Fatal("expected second server challenge to fail")
}
if !errors.Is(err, ErrUnexpectedServerChallange) {
t.Errorf("expected error to be: %s, got: %s", ErrUnexpectedServerChallange, err)
Expand Down Expand Up @@ -673,21 +673,21 @@ func TestLoginAuth(t *testing.T) {
}
resp, err := auth.Next([]byte(user), true)
if err != nil {
t.Errorf("failed on first server challange: %s", err)
t.Errorf("failed on first server challenge: %s", err)
}
if !bytes.Equal([]byte(user), resp) {
t.Errorf("expected response to first challange to be: %q, got: %q", user, resp)
t.Errorf("expected response to first challenge to be: %q, got: %q", user, resp)
}
resp, err = auth.Next([]byte(pass), true)
if err != nil {
t.Errorf("failed on second server challange: %s", err)
t.Errorf("failed on second server challenge: %s", err)
}
if !bytes.Equal([]byte(pass), resp) {
t.Errorf("expected response to second challange to be: %q, got: %q", pass, resp)
t.Errorf("expected response to second challenge to be: %q, got: %q", pass, resp)
}
_, err = auth.Next([]byte("nonsense"), true)
if err == nil {
t.Error("expected third server challange to fail, but didn't")
t.Error("expected third server challenge to fail, but didn't")
}
if !errors.Is(err, ErrUnexpectedServerResponse) {
t.Errorf("expected error to be: %s, got: %s", ErrUnexpectedServerResponse, err)
Expand Down Expand Up @@ -821,21 +821,21 @@ func TestLoginAuth_noEnc(t *testing.T) {
}
resp, err := auth.Next([]byte(user), true)
if err != nil {
t.Errorf("failed on first server challange: %s", err)
t.Errorf("failed on first server challenge: %s", err)
}
if !bytes.Equal([]byte(user), resp) {
t.Errorf("expected response to first challange to be: %q, got: %q", user, resp)
t.Errorf("expected response to first challenge to be: %q, got: %q", user, resp)
}
resp, err = auth.Next([]byte(pass), true)
if err != nil {
t.Errorf("failed on second server challange: %s", err)
t.Errorf("failed on second server challenge: %s", err)
}
if !bytes.Equal([]byte(pass), resp) {
t.Errorf("expected response to second challange to be: %q, got: %q", pass, resp)
t.Errorf("expected response to second challenge to be: %q, got: %q", pass, resp)
}
_, err = auth.Next([]byte("nonsense"), true)
if err == nil {
t.Error("expected third server challange to fail, but didn't")
t.Error("expected third server challenge to fail, but didn't")
}
if !errors.Is(err, ErrUnexpectedServerResponse) {
t.Errorf("expected error to be: %s, got: %s", ErrUnexpectedServerResponse, err)
Expand Down Expand Up @@ -920,14 +920,14 @@ func TestXOAuth2Auth(t *testing.T) {
}
resp, err := auth.Next([]byte("nonsense"), true)
if err != nil {
t.Errorf("failed on first server challange: %s", err)
t.Errorf("failed on first server challenge: %s", err)
}
if !bytes.Equal([]byte(""), resp) {
t.Errorf("expected server response to be empty, got: %q", resp)
}
_, err = auth.Next([]byte("nonsense"), false)
if err != nil {
t.Errorf("failed on first server challange: %s", err)
t.Errorf("failed on first server challenge: %s", err)
}
})
t.Run("XOAuth2 succeeds with faker", func(t *testing.T) {
Expand Down
Loading