Skip to content

Commit

Permalink
add some more tests
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandar Stojanov <[email protected]>
  • Loading branch information
losisin committed Apr 11, 2024
1 parent bfc0aad commit bc9cbbf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func schemasEqual(a, b *Schema) bool {
return a == b
}
// Compare simple fields
if a.Type != b.Type || a.Pattern != b.Pattern || a.UniqueItems != b.UniqueItems || a.Title != b.Title || a.ReadOnly != b.ReadOnly {
if a.Type != b.Type || a.Pattern != b.Pattern || a.UniqueItems != b.UniqueItems || a.Title != b.Title || a.Description != b.Description || a.ReadOnly != b.ReadOnly {
return false
}
// Compare pointer fields
Expand Down Expand Up @@ -156,9 +156,9 @@ func TestMergeSchemas(t *testing.T) {
},
{
name: "meta-data properties",
dest: &Schema{Type: "object", Title: "My Title", ReadOnly: true, Default: "default value"},
src: &Schema{Type: "object", Title: "My Title", ReadOnly: true, Default: "default value"},
want: &Schema{Type: "object", Title: "My Title", ReadOnly: true, Default: "default value"},
dest: &Schema{Type: "object", Title: "My Title", Description: "My description", ReadOnly: true, Default: "default value"},
src: &Schema{Type: "object", Title: "My Title", Description: "My description", ReadOnly: true, Default: "default value"},
want: &Schema{Type: "object", Title: "My Title", Description: "My description", ReadOnly: true, Default: "default value"},
},
}

Expand Down

0 comments on commit bc9cbbf

Please sign in to comment.