14 lines
333 B
Go
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)
|
|
}
|
|
}
|