Skip to content

Commit

Permalink
added Timecop.unfreeze
Browse files Browse the repository at this point in the history
  • Loading branch information
pmclaren19 committed Feb 18, 2025
1 parent c5aa6f9 commit a1f7cee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

status_updater.update_status
end
Timecop.unfreeze
end

if error_message
Expand All @@ -55,6 +56,7 @@
expect { status_updater.update_status }.to change(lighthouse_document_upload, :error_message)
.to(error_message.to_s)
end
Timecop.unfreeze
end

it 'updates status, failed_date, acknowledgement_date and template_metadata' do
Expand All @@ -73,6 +75,7 @@
.from(lighthouse_document_upload.template_metadata)
.to(updated_template_metadata)
end
Timecop.unfreeze
end
end
else # testing success status
Expand All @@ -87,6 +90,7 @@
.from(BenefitsDocuments::Constants::UPLOAD_STATUS[:PENDING])
.to(BenefitsDocuments::Constants::UPLOAD_STATUS[:SUCCESS])
end
Timecop.unfreeze
end
end
end
Expand Down
1 change: 1 addition & 0 deletions spec/sidekiq/evss/document_upload_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
expect(evidence_submission.failed_date).to be_within(1.second).of(current_date_time.utc)
expect(evidence_submission.acknowledgement_date).to be_within(1.second).of((current_date_time + 30.days).utc)
end
Timecop.unfreeze
end

it 'fails to create a failed evidence submission record when args malformed' do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def mock_response(status:, body:)
expect(evidence_submission.failed_date).to be_within(1.second).of(current_date_time.utc)
expect(evidence_submission.acknowledgement_date).to be_within(1.second).of((current_date_time + 30.days).utc)
end
Timecop.unfreeze
end

it 'fails to create a failed evidence submission record when args malformed' do
Expand Down

0 comments on commit a1f7cee

Please sign in to comment.