material_manage_system/internal/handler/error_message_test.go
2026-09-20 14:29:41 +08:00

14 lines
333 B
Go

package handler
import (
"testing"
"github.com/wmms/wmms/internal/service"
)
func TestUserFacingServiceErrorMessage_LocalizesInsufficientStock(t *testing.T) {
if got := userFacingServiceErrorMessage(service.ErrInsufficientStock); got != "库存不足" {
t.Fatalf("库存不足应返回中文提示,实际为 %q", got)
}
}