From fbc699c3232e022e5cd51475c088f5b43eab4ce7 Mon Sep 17 00:00:00 2001 From: turtleDev Date: Thu, 5 Sep 2024 16:17:51 +0530 Subject: [PATCH] deserialization: add tests for DeserializeFunc --- deserialization/proto_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/deserialization/proto_test.go b/deserialization/proto_test.go index 25463ff9..cb188068 100644 --- a/deserialization/proto_test.go +++ b/deserialization/proto_test.go @@ -26,6 +26,15 @@ func TestProtoDeserilizer_Deserialize(t *testing.T) { }, wantErr: false, }, + { + name: "Return error for non-proto message", + d: DeserializeProto, + args: args{ + b: []byte{}, + i: struct{}{}, + }, + wantErr: true, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) {