mirror of
https://github.com/Fishwaldo/huma.git
synced 2025-03-15 19:31:27 +00:00
24 lines
334 B
Go
24 lines
334 B
Go
package huma
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestResource(t *testing.T) {
|
|
r := Resource{
|
|
path: "/test",
|
|
}
|
|
|
|
assert.NotNil(t, r.toOpenAPI(&oaComponents{}))
|
|
}
|
|
|
|
func TestHiddenResource(t *testing.T) {
|
|
r := Resource{
|
|
path: "/test",
|
|
}
|
|
r.Hidden()
|
|
|
|
assert.Nil(t, r.toOpenAPI(&oaComponents{}))
|
|
}
|