mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-07 20:47:45 +00:00
Adding tests to cover model as we grow it.
This commit is contained in:
@@ -19,4 +19,14 @@ func TestCreateDocument(t *testing.T) {
|
||||
doc, err := CreateDocument(data)
|
||||
assert.NotNil(t, doc)
|
||||
assert.NoError(t, err)
|
||||
|
||||
assert.Equal(t, "3.0.1", doc.Version.Value)
|
||||
assert.Equal(t, "Burger Shop", doc.Info.Value.Title.Value)
|
||||
assert.NotEmpty(t, doc.Info.Value.Title.Value)
|
||||
assert.Equal(t, "https://pb33f.io", doc.Info.Value.TermsOfService.Value)
|
||||
assert.Equal(t, "pb33f", doc.Info.Value.Contact.Value.Name.Value)
|
||||
assert.Equal(t, "buckaroo@pb33f.io", doc.Info.Value.Contact.Value.Email.Value)
|
||||
assert.Equal(t, "https://pb33f.io", doc.Info.Value.Contact.Value.URL.Value)
|
||||
assert.Equal(t, "1.2", doc.Info.Value.Version.Value)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user