Skip to content

Commit

Permalink
match partial error string
Browse files Browse the repository at this point in the history
  • Loading branch information
artificial-aidan committed Jan 18, 2024
1 parent 9a62173 commit 6457ef3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions copy_proto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,7 @@ func TestStructToStruct_UnknownAnyDefault(t *testing.T) {

mask := fieldmask_utils.MaskFromString("Details")
err := fieldmask_utils.StructToStruct(mask, userWithUnknown, emptyUser)
assert.Equal(t, "proto:\u00a0not found", err.Error())

assert.Contains(t, err.Error(), "not found")
}

func TestStructToStruct_UnknownAnySubfieldMask(t *testing.T) {
Expand All @@ -341,7 +340,7 @@ func TestStructToStruct_UnknownAnySubfieldMask(t *testing.T) {

mask := fieldmask_utils.MaskFromString("Details{Id}")
err := fieldmask_utils.StructToStruct(mask, userWithUnknown, emptyUser, fieldmask_utils.WithUnmarshalAllAny(false))
assert.Equal(t, "proto:\u00a0not found", err.Error())
assert.Contains(t, err.Error(), "not found")
}
func TestStructToMap_Success(t *testing.T) {
userDst := make(map[string]interface{})
Expand Down

0 comments on commit 6457ef3

Please sign in to comment.