fix: Removes superfluous test

This commit is contained in:
Benjamin Nolan (TwoWholeWorms)
2023-01-07 08:43:54 +01:00
committed by Dave Shanley
parent 5f9541283a
commit 04c4f963fd

View File

@@ -376,42 +376,6 @@ func TestPath_Build_Using_CircularRef(t *testing.T) {
}
func TestPath_Build_Using_CircularRef_Invalid(t *testing.T) {
// first we need an index.
yml := `paths:
'/something/here':
post:
$ref: '#/paths/~1something~1there/post'
'/something/there':
post:
$ref: '#/paths/~1something~1here/post'`
var idxNode yaml.Node
mErr := yaml.Unmarshal([]byte(yml), &idxNode)
assert.NoError(t, mErr)
idx := index.NewSpecIndex(&idxNode)
resolve := resolver.NewResolver(idx)
errs := resolve.CheckForCircularReferences()
assert.Len(t, errs, 1)
yml = `"/some/path":
$ref: '#/paths/~1something~1here/post'`
var rootNode yaml.Node
mErr = yaml.Unmarshal([]byte(yml), &rootNode)
assert.NoError(t, mErr)
var n Paths
err := low.BuildModel(rootNode.Content[0], &n)
assert.NoError(t, err)
err = n.Build(rootNode.Content[0], idx)
assert.Error(t, err)
}
func TestPath_Build_Using_CircularRefWithOp(t *testing.T) {
// first we need an index.