Skip to content

Commit

Permalink
remove unnecessary test
Browse files Browse the repository at this point in the history
  • Loading branch information
alovak committed Oct 26, 2024
1 parent aab1091 commit 0c769d9
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1753,26 +1753,6 @@ func TestMessageClone(t *testing.T) {
require.Equal(t, message2Data.F55.F9A.Value(), message3Data.F55.F9A.Value())
require.Equal(t, message2Data.F55.F9F02.Value(), message3Data.F55.F9F02.Value())
require.Equal(t, message2Data.F120.Value(), message3Data.F120.Value())

// here is the way how to reset fields
response, err := message3.Clone()
// handle error

err = response.Marshal(&struct {
PAN *string `iso8583:"2,keepzero"`
F55 *struct {
F9A *string `iso8583:",keepzero"`
} `iso8583:",keepzero"`
}{})
require.NoError(t, err)

responseData := &TestISOData{}
require.NoError(t, response.Unmarshal(responseData))

// check if the PAN is reset
require.Equal(t, "", responseData.F2.Value())
// check if the F55.F9A is reset
require.Equal(t, "", responseData.F55.F9A.Value())
}

func TestMessageMarshaling(t *testing.T) {
Expand Down

0 comments on commit 0c769d9

Please sign in to comment.