From bf0055de5b875a7939ef1072f55a53ab957f9af3 Mon Sep 17 00:00:00 2001 From: Pavel Gabriel Date: Sat, 26 Oct 2024 17:09:13 +0200 Subject: [PATCH] add one more test --- message_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/message_test.go b/message_test.go index 1ae124a..e4f8cfd 100644 --- a/message_test.go +++ b/message_test.go @@ -368,6 +368,12 @@ func TestMessage(t *testing.T) { require.Equal(t, wantMsg, rawMsg) }) + t.Run("Unset doesn't return error for fields that are not set", func(t *testing.T) { + message := NewMessage(spec) + err := message.UnsetFields("2", "3", "4") + require.NoError(t, err) + }) + t.Run("Unset unsets fields", func(t *testing.T) { type TestISOF3Data struct { F1 *field.String