// Copyright 2026 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package admin

import (
	"errors"
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestShortTestMailError(t *testing.T) {
	assert.Equal(t, "User unknown", shortTestMailError(errors.New("failed to issue RCPT command: 554 5.1.1 <user@example.com>: Recipient address rejected: User unknown in virtual mailbox table")))
	assert.Equal(t, "Relay access denied", shortTestMailError(errors.New("failed to issue RCPT command: 554 5.7.1 <user@example.com>: Relay access denied")))
}
