Skip to content

Commit

Permalink
[ARP] Fix POA signature (#21168)
Browse files Browse the repository at this point in the history
  • Loading branch information
nihil2501 authored Mar 7, 2025
1 parent 41e772b commit 357e539
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def active_power_of_attorney_holders
.select(&:accepts_digital_power_of_attorney_requests?)
end

def registration_number(power_of_attorney_holder_type)
def get_registration_number(power_of_attorney_holder_type)
registrations.each do |registration|
next unless registration.power_of_attorney_holder_type == power_of_attorney_holder_type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,14 @@ def form_payload
end

def organization_data
registration_number =
creator.get_registration_number(
poa_request.power_of_attorney_holder_type
)

{
poaCode: poa_request.power_of_attorney_holder_poa_code,
# TODO: update when allowing non-veteran claimant submissions
registrationNumber: poa_request.accredited_individual_registration_number
registrationNumber: registration_number
}
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ module AccreditedRepresentativePortal
end
end

describe '#registration_number' do
subject { user_account.registration_number(power_of_attorney_holder_type) }
describe '#get_registration_number' do
subject { user_account.get_registration_number(power_of_attorney_holder_type) }

context 'without a user email set' do
let(:user_email) { nil }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@
let!(:other_vso) { create(:organization, poa: other_poa_code, can_accept_digital_poa_requests: true) }

let!(:poa_request) do
create(:power_of_attorney_request, :with_veteran_claimant, poa_code:)
create(
:power_of_attorney_request,
:with_veteran_claimant,
accredited_individual_registration_number: nil,
poa_code:
)
end
let!(:other_poa_request) { create(:power_of_attorney_request, poa_code: other_poa_code) }

Expand All @@ -41,7 +46,6 @@
:accredited_representative_portal_pilot,
instance_of(AccreditedRepresentativePortal::RepresentativeUser)
).and_return(true)
poa_request.update(accredited_individual_registration_number: '357458')
poa_request.claimant.update(icn: '1012666183V089914')

login_as(test_user)
Expand Down

0 comments on commit 357e539

Please sign in to comment.