mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 12:37:49 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user