Skip to content

Commit

Permalink
✅ test: add more assert check for test issues #213
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Jul 31, 2023
1 parent 0e59d42 commit a142ed7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions issues_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,8 @@ func TestIssues_213(t *testing.T) {
f := &Form{}
v := validate.Struct(f) // nolint:varnamelen
assert.False(t, v.Validate())
fmt.Println(v.Errors)
// fmt.Println(v.Errors)
assert.StrContains(t, v.Errors.String(), "Data is required to not be empty")

f = &Form{
Data: []Person{
Expand All @@ -1283,7 +1284,8 @@ func TestIssues_213(t *testing.T) {
}
v = validate.Struct(f) // nolint:varnamelen
assert.False(t, v.Validate())
fmt.Println(v.Errors)
// fmt.Println(v.Errors)
assert.StrContains(t, v.Errors.String(), "age is required to not be empty")
}

// https://github.com/gookit/validate/issues/217
Expand Down

0 comments on commit a142ed7

Please sign in to comment.