mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-06 20:47:49 +00:00
bumped coverage
This commit is contained in:
@@ -13,10 +13,12 @@ import (
|
||||
func TestLicense_Hash(t *testing.T) {
|
||||
|
||||
left := `url: https://pb33f.io
|
||||
description: the ranch`
|
||||
description: the ranch
|
||||
x-happy: dance`
|
||||
|
||||
right := `url: https://pb33f.io
|
||||
description: the ranch`
|
||||
description: the ranch
|
||||
x-drink: beer`
|
||||
|
||||
var lNode, rNode yaml.Node
|
||||
_ = yaml.Unmarshal([]byte(left), &lNode)
|
||||
@@ -31,9 +33,10 @@ description: the ranch`
|
||||
assert.Equal(t, lDoc.Hash(), rDoc.Hash())
|
||||
|
||||
l := License{}
|
||||
l.Build(nil, &lNode, &rNode, nil)
|
||||
l.Build(nil, lNode.Content[0], rNode.Content[0], nil)
|
||||
assert.NotNil(t, l.GetRootNode())
|
||||
assert.NotNil(t, l.GetKeyNode())
|
||||
assert.Equal(t, 1, l.GetExtensions().Len())
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user