mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
Fix the tests
This commit is contained in:
@@ -33,7 +33,7 @@ func TestCallback_Build_Success(t *testing.T) {
|
||||
err := low.BuildModel(rootNode.Content[0], &n)
|
||||
assert.NoError(t, err)
|
||||
|
||||
err = n.Build(rootNode.Content[0], nil)
|
||||
err = n.Build(nil, rootNode.Content[0], nil)
|
||||
assert.NoError(t, err)
|
||||
|
||||
assert.Len(t, n.Expression.Value, 1)
|
||||
@@ -65,7 +65,7 @@ func TestCallback_Build_Error(t *testing.T) {
|
||||
err := low.BuildModel(rootNode.Content[0], &n)
|
||||
assert.NoError(t, err)
|
||||
|
||||
err = n.Build(rootNode.Content[0], idx)
|
||||
err = n.Build(nil, rootNode.Content[0], idx)
|
||||
assert.Error(t, err)
|
||||
|
||||
}
|
||||
@@ -100,7 +100,7 @@ func TestCallback_Build_Using_InlineRef(t *testing.T) {
|
||||
err := low.BuildModel(rootNode.Content[0], &n)
|
||||
assert.NoError(t, err)
|
||||
|
||||
err = n.Build(rootNode.Content[0], idx)
|
||||
err = n.Build(nil, rootNode.Content[0], idx)
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, n.Expression.Value, 1)
|
||||
|
||||
@@ -128,7 +128,7 @@ x-weed: loved`
|
||||
|
||||
var n Callback
|
||||
_ = low.BuildModel(idxNode.Content[0], &n)
|
||||
_ = n.Build(idxNode.Content[0], idx)
|
||||
_ = n.Build(nil, idxNode.Content[0], idx)
|
||||
|
||||
yml2 := `burgers:
|
||||
description: tasty!
|
||||
@@ -145,7 +145,7 @@ beer:
|
||||
|
||||
var n2 Callback
|
||||
_ = low.BuildModel(idxNode2.Content[0], &n2)
|
||||
_ = n2.Build(idxNode2.Content[0], idx2)
|
||||
_ = n2.Build(nil, idxNode2.Content[0], idx2)
|
||||
|
||||
// hash
|
||||
assert.Equal(t, n.Hash(), n2.Hash())
|
||||
|
||||
Reference in New Issue
Block a user