mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
A massive test update to bring everything inlne with the new Buildable signature.
All tests in index and datamodel now pass. The rolodex fixes all the things. Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/pb33f/libopenapi/datamodel/low"
|
||||
"github.com/pb33f/libopenapi/index"
|
||||
"github.com/stretchr/testify/assert"
|
||||
@@ -27,7 +28,7 @@ nothing: int`
|
||||
|
||||
var n Examples
|
||||
_ = low.BuildModel(idxNode.Content[0], &n)
|
||||
_ = n.Build(nil, idxNode.Content[0], idx)
|
||||
_ = n.Build(context.Background(), nil, idxNode.Content[0], idx)
|
||||
|
||||
yml2 := `anything:
|
||||
cake: burger
|
||||
@@ -43,7 +44,7 @@ yes:
|
||||
|
||||
var n2 Examples
|
||||
_ = low.BuildModel(idxNode2.Content[0], &n2)
|
||||
_ = n2.Build(nil, idxNode2.Content[0], idx2)
|
||||
_ = n2.Build(context.Background(), nil, idxNode2.Content[0], idx2)
|
||||
|
||||
assert.Equal(t, n.Hash(), n2.Hash())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user