Skip to content

Commit 97a9eec

Browse files
Merge pull request #73 from dailypay/master
fix: use federalreservebanks holiday definition for ACH files
2 parents 0c8da9b + e360008 commit 97a9eec

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

lib/ach/next_federal_reserve_effective_date.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class NextFederalReserveEffectiveDate
66
if Gem.loaded_specs['holidays'].version < Gem::Version.new('7.0.0')
77
:federal_reserve
88
else
9-
:federalreserve
9+
:federalreservebanks
1010
end
1111
def initialize(submission_date)
1212
@submission_date = submission_date

spec/ach/next_federal_reserve_effective_date_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@
3636
end
3737
end
3838

39+
context 'when today is Thursday and tomorrow is a observed holiday' do
40+
let(:run_date) { Date.new(2023, 11, 9) }
41+
42+
it 'returns tomorrow' do
43+
expect(subject).to eq(Date.new(2023, 11, 10))
44+
end
45+
end
46+
3947
context 'when today is Monday and a holiday' do
4048
let(:run_date) { Date.new(2012, 5, 28) }
4149

0 commit comments

Comments
 (0)