refactor(docs): remove duplicate util func to format possible values (#1050)
This commit is contained in:
parent
64d6fa9bea
commit
52b879b436
28 changed files with 30 additions and 77 deletions
|
|
@ -253,39 +253,6 @@ func TestSimplifyBackupSchedule(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestSupportedValuesDocumentation(t *testing.T) {
|
||||
tests := []struct {
|
||||
description string
|
||||
values []string
|
||||
expected string
|
||||
}{
|
||||
{
|
||||
"empty values",
|
||||
[]string{},
|
||||
"",
|
||||
},
|
||||
{
|
||||
"single value",
|
||||
[]string{"value"},
|
||||
"Supported values are: `value`.",
|
||||
},
|
||||
{
|
||||
"multiple values",
|
||||
[]string{"value1", "value2", "value3"},
|
||||
"Supported values are: `value1`, `value2`, `value3`.",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.description, func(t *testing.T) {
|
||||
output := SupportedValuesDocumentation(tt.values)
|
||||
if output != tt.expected {
|
||||
t.Fatalf("Data does not match: %s", output)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsLegacyProjectRole(t *testing.T) {
|
||||
tests := []struct {
|
||||
description string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue