mirror of
https://github.com/warmbly/warmbly.git
synced 2026-11-28 08:05:45 +00:00
22 lines
637 B
Go
22 lines
637 B
Go
package models
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/warmbly/warmbly/internal/errx"
|
|
)
|
|
|
|
func TestWarmupSendFailureKind(t *testing.T) {
|
|
for message, want := range map[string]string{
|
|
MailboxNotLoadedPrefix + ". It is reloaded automatically.": WarmupFailureLoading,
|
|
errx.ErrMailSendingTooFast.Message: WarmupFailureThrottled,
|
|
errx.ErrMailQuotaExceeded.Message: "",
|
|
"Microsoft rejected the expired sign-in.": "",
|
|
"": "",
|
|
} {
|
|
if got := WarmupSendFailureKind(message); got != want {
|
|
t.Errorf("WarmupSendFailureKind(%q) = %q, want %q", message, got, want)
|
|
}
|
|
}
|
|
}
|