From c64224032ba23a01505a080115c4603263924547 Mon Sep 17 00:00:00 2001 From: "mayur.popli" Date: Fri, 28 Mar 2025 14:16:50 +0530 Subject: [PATCH] fix: resolved comments --- pkg/response/response_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkg/response/response_test.go b/pkg/response/response_test.go index 242fa72..73dcb6a 100644 --- a/pkg/response/response_test.go +++ b/pkg/response/response_test.go @@ -301,3 +301,17 @@ func compareContexts(c1, c2 map[string]interface{}) bool { return reflect.DeepEqual(c1, c2) } + +func TestSchemaValidationErr_Error(t *testing.T) { + validationErrors := []Error{ + {Paths: "name", Message: "Name is required"}, + {Paths: "email", Message: "Invalid email format"}, + } + err := SchemaValidationErr{Errors: validationErrors} + expected := "name: Name is required; email: Invalid email format" + if err.Error() != expected { + t.Errorf("err.Error() = %s, want %s", + err.Error(), expected) + + } +}