Skip to content

Commit

Permalink
Add test for empty enum value (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
tfaller committed Jul 25, 2022
1 parent 2feb91c commit 35014f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
9 changes: 5 additions & 4 deletions internal/test/issues/issue-illegal_enum_names/issue.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -47,6 +47,7 @@ func TestIllegalEnumNames(t *testing.T) {
}
}

require.Equal(t, `""`, constDefs["BarEmpty"])
require.Equal(t, `"Bar"`, constDefs["BarBar"])
require.Equal(t, `"Foo"`, constDefs["BarFoo"])
require.Equal(t, `"Foo Bar"`, constDefs["BarFooBar"])
Expand Down
1 change: 1 addition & 0 deletions internal/test/issues/issue-illegal_enum_names/spec.yaml
Expand Up @@ -22,6 +22,7 @@ components:
Bar:
type: string
enum:
- ''
- Foo
- Bar
- Foo Bar
Expand Down

0 comments on commit 35014f7

Please sign in to comment.