Skip to content

Commit

Permalink
Merge pull request #418 from wneessen/chore/prepare-061-release
Browse files Browse the repository at this point in the history
chore: prepare 061 release
  • Loading branch information
wneessen authored Jan 12, 2025
2 parents 9924b08 + 47f46c5 commit 559046e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
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

0 comments on commit 559046e

Please sign in to comment.