Bumping test coverage

There are issues with circular references at scale, there may need to be a change after this commit.
This commit is contained in:
Dave Shanley
2022-08-26 09:49:48 -04:00
parent 081fc9be56
commit 6e0d25776a
13 changed files with 268 additions and 13 deletions

View File

@@ -468,3 +468,17 @@ func TestCreateDocument_CheckAdditionalProperties_Bool(t *testing.T) {
assert.NotNil(t, d.Value.AdditionalProperties.Value)
assert.True(t, d.Value.AdditionalProperties.Value.(bool))
}
func TestCreateDocument_Components_Error(t *testing.T) {
yml := `components:
schemas:
bork:
properties:
bark:
$ref: #bork`
info, _ := datamodel.ExtractSpecInfo([]byte(yml))
var err []error
doc, err = CreateDocument(info)
assert.Len(t, err, 1)
}