Skip to content

Commit

Permalink
updated fields that get logged into EvidenceSubmission
Browse files Browse the repository at this point in the history
  • Loading branch information
samcoforma committed Oct 24, 2024
1 parent d0e7f9a commit ce73523
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/services/evss_claim_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ def record_workaround(task, claim_id, job_id)
end

def record_evidence_submission(claim_id, job_id, tracked_item_id)
icn = @user.icn
user_account_id = @user.user_account_uuid
job_class = self.class
upload_status = 'pending'
EvidenceSubmission.create(claim_id:,
tracked_item_id:,
icn:,
user_account_id:,
job_id:,
job_class:,
upload_status:)
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20240925160219_create_evidence_submissions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def change
t.string :job_id
t.string :job_class
t.string :claim_id
t.string :icn
t.string :user_account_id
t.json :template_metadata_ciphertext
t.text :encrypted_kms_key
t.string :upload_status
Expand Down
2 changes: 1 addition & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/lighthouse/benefits_documents/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ def handle_error(error, lighthouse_client_id, endpoint)
end

def record_evidence_submission(claim_id, job_id, tracked_item_id)
icn = @user.icn
user_account_id = @user.user_account_uuid
job_class = self.class
upload_status = 'pending'
EvidenceSubmission.create(claim_id:,
tracked_item_id:,
icn:,
user_account_id:,
job_id:,
job_class:,
upload_status:)
Expand Down
1 change: 1 addition & 0 deletions spec/lib/lighthouse/benefits_documents/service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

RSpec.describe BenefitsDocuments::Service do
let(:user) { FactoryBot.create(:user, :loa3) }
let(:user_account) { create(:user_account) }
let(:service) { BenefitsDocuments::Service.new(user) }

describe '#queue_document_upload' do
Expand Down
1 change: 1 addition & 0 deletions spec/services/evss_claim_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
subject { service }

let(:user) { FactoryBot.create(:user, :loa3) }
let(:user_account) { create(:user_account) }
let(:client_stub) { instance_double('EVSS::ClaimsService') }
let(:service) { described_class.new(user) }

Expand Down

0 comments on commit ce73523

Please sign in to comment.