From bf54fb0c19dc6a6ef8370e069eb54d2abece8416 Mon Sep 17 00:00:00 2001 From: Mike Rotondo Date: Thu, 19 Dec 2024 17:08:52 -0800 Subject: [PATCH] fix timezone issues in md el101 pdf test (#5261) --- spec/lib/pdf_filler/md_el101_pdf_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/lib/pdf_filler/md_el101_pdf_spec.rb b/spec/lib/pdf_filler/md_el101_pdf_spec.rb index 4c38310df3..3ad6af2ab3 100644 --- a/spec/lib/pdf_filler/md_el101_pdf_spec.rb +++ b/spec/lib/pdf_filler/md_el101_pdf_spec.rb @@ -6,6 +6,7 @@ let(:intake) { create(:state_file_md_intake) } let(:submission) { create :efile_submission, tax_return: nil, data_source: intake } let(:pdf) { described_class.new(submission) } + let(:expected_signature_date) { DateTime.now.in_time_zone(StateFile::StateInformationService.timezone('md')).strftime("%F") } describe "#hash_for_pdf" do let(:file_path) { described_class.new(submission).output_file.path } @@ -33,7 +34,7 @@ expect(pdf_fields["ERO firm name"]).to eq "FileYourStateTaxes" expect(pdf_fields["to enter or generate my PIN"]).to eq "23456" expect(pdf_fields["Primary signature"]).to eq "Mary Lando" - expect(pdf_fields["Date"]).to eq Date.today.strftime("%F") + expect(pdf_fields["Date"]).to eq expected_signature_date expect(pdf_fields["Spouses First Name"]).to eq("") expect(pdf_fields["Spouse MI"]).to eq("") expect(pdf_fields["Spouses Last Name"]).to eq("") @@ -85,7 +86,7 @@ expect(pdf_fields["ERO firm name_2"]).to eq "FileYourStateTaxes" expect(pdf_fields["to enter or generate my PIN_2"]).to eq "11111" expect(pdf_fields["Spouses signature"]).to eq "Marty Lando" - expect(pdf_fields["Date_2"]).to eq Date.today.strftime("%F") + expect(pdf_fields["Date_2"]).to eq expected_signature_date end end end