mirror of
https://github.com/Fishwaldo/huma.git
synced 2025-03-15 19:31:27 +00:00
20 lines
336 B
Go
20 lines
336 B
Go
package huma
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestErrorDetailAsError(t *testing.T) {
|
|
d := ErrorDetail{
|
|
Message: "foo",
|
|
Location: "bar",
|
|
Value: "baz",
|
|
}
|
|
|
|
rendered := d.Error()
|
|
assert.Contains(t, rendered, "foo")
|
|
assert.Contains(t, rendered, "bar")
|
|
assert.Contains(t, rendered, "baz")
|
|
}
|