mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 04:20:17 +00:00
first level testing for rending v3 model in place.
Now onto some hardening tests, lets re-render each spec after reading to check for failures.
This commit is contained in:
@@ -290,7 +290,7 @@ func Test_Schema(t *testing.T) {
|
||||
// check discriminator
|
||||
assert.NotNil(t, sch.Discriminator.Value)
|
||||
assert.Equal(t, "athing", sch.Discriminator.Value.PropertyName.Value)
|
||||
assert.Len(t, sch.Discriminator.Value.Mapping, 2)
|
||||
assert.Len(t, sch.Discriminator.Value.Mapping.Value, 2)
|
||||
mv := sch.Discriminator.Value.FindMappingValue("log")
|
||||
assert.Equal(t, "cat", mv.Value)
|
||||
mv = sch.Discriminator.Value.FindMappingValue("pizza")
|
||||
|
||||
Reference in New Issue
Block a user