Skip to content

Commit

Permalink
test/issues: verify FileIDModifier is read
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf committed Oct 31, 2023
1 parent 6bc0986 commit 1a76338
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions test/issues/issue702_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (
"testing"

"github.com/moov-io/ach"

"github.com/stretchr/testify/require"
)

func TestIssue702(t *testing.T) {
Expand All @@ -49,6 +51,8 @@ func TestIssue702(t *testing.T) {
t.Error(err)
}

require.Equal(t, "B", file.Header.FileIDModifier)

if file.Header.ImmediateDestination != "YYYYYYYYY" {
t.Errorf("file.Header.ImmediateDestination=%s", file.Header.ImmediateDestination)
}
Expand Down Expand Up @@ -86,6 +90,8 @@ func TestIssue702_1(t *testing.T) {
}
}

require.Equal(t, "B", file.Header.FileIDModifier)

if file.Header.ImmediateOrigin != "182327390" {
t.Errorf("ImmediateOrigin=%s", file.Header.ImmediateOrigin)
}
Expand Down
2 changes: 1 addition & 1 deletion test/issues/testdata/issue702-1.ach
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
101 10006XXXX 1823273902003271043 094101PIMRET825324 FISERV
101 10006XXXX 1823273902003271043B094101PIMRET825324 FISERV
9000000000001000000000000000000000000000000000000000000
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
Expand Down
2 changes: 1 addition & 1 deletion test/issues/testdata/issue702.ach
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
101 YYYYYYYYY 1823273902003310500 094101PIMRET825324 FISERV
101 YYYYYYYYY 1823273902003310500B094101PIMRET825324 FISERV
5220POSSIBLE FINANCE 1823273909PPDLOAN 2003270911031101270002607
621101206101686133344441 000000010260502a49fb51411Prasad Mahendra 1031101278009179
799R04101206100000001 03110127PSEUDORETN 031101278009179
Expand Down

0 comments on commit 1a76338

Please sign in to comment.