Skip to content

Commit cb5a2bc

Browse files
committed
chore: remove duplicated slice test
1 parent b9f15a3 commit cb5a2bc

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

internal/codegenerator/build_validator_test.go

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ errs = append(errs, types.NewValidationError("field1 must be equal to Nested.fie
6161
}
6262
}
6363

64-
func TestBuildValidationCodeWithNestedStructsAndSlices(t *testing.T) {
64+
func TestBuildValidationCodeWithNestedStructs(t *testing.T) {
6565
type args struct {
6666
fieldName string
6767
fieldType common.FieldType
@@ -90,18 +90,6 @@ func TestBuildValidationCodeWithNestedStructsAndSlices(t *testing.T) {
9090
},
9191
want: "errs = append(errs, mypkg.InnerStructTypeValidate(&obj.Field)...)\n",
9292
},
93-
{
94-
name: "test code with required slice of string",
95-
args: args{
96-
fieldName: "Field",
97-
fieldType: common.FieldType{BaseType: "string", ComposedType: "[]"},
98-
fieldValidation: "required",
99-
},
100-
want: `if !(len(obj.Field) != 0) {
101-
errs = append(errs, types.NewValidationError("Field must not be empty"))
102-
}
103-
`,
104-
},
10593
}
10694

10795
for _, tt := range tests {

0 commit comments

Comments
 (0)