-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
15: [ART] Have serializers match front end data (#20254)
* art/serializers/match_front_end_data * art/serializers/match_front_end_data - fixed tests * art/serializers/match_front_end_data - fixed rubocop * art/serializers/match_front_end_data - post oren comments 1.0 * art/serializers/match_front_end_data - fixed rubocop * [ART] fix POA request factory hooks, un-abstract expected spec response * [ART] (fix) Minor lint fixes * art/serializers/match_front_end_data - added serializer spec --------- Co-authored-by: OJ Bucao <[email protected]> Co-authored-by: Oren Mittman <[email protected]>
- Loading branch information
1 parent
0d4ec63
commit 1c386dc
Showing
10 changed files
with
372 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
form_data = { | ||
dependent_claimant_data_hash = { | ||
authorizations: { | ||
record_disclosure: true, | ||
record_disclosure_limitations: [], | ||
|
@@ -51,12 +51,47 @@ | |
} | ||
} | ||
|
||
veteran_claimant_data_hash = { | ||
authorizations: { | ||
record_disclosure: true, | ||
record_disclosure_limitations: %w[ | ||
HIV | ||
DRUG_ABUSE | ||
], | ||
address_change: true | ||
}, | ||
dependent: nil, | ||
veteran: { | ||
name: { | ||
first: 'John', | ||
middle: 'Middle', | ||
last: 'Doe' | ||
}, | ||
address: { | ||
address_line1: '123 Main St', | ||
address_line2: 'Apt 1', | ||
city: 'Springfield', | ||
state_code: 'IL', | ||
country: 'US', | ||
zip_code: '62704', | ||
zip_code_suffix: '6789' | ||
}, | ||
ssn: '123456789', | ||
va_file_number: '123456789', | ||
date_of_birth: '1980-12-31', | ||
service_number: '123456789', | ||
service_branch: 'ARMY', | ||
phone: '1234567890', | ||
email: '[email protected]' | ||
} | ||
} | ||
|
||
FactoryBot.define do | ||
factory :power_of_attorney_form, class: 'AccreditedRepresentativePortal::PowerOfAttorneyForm' do | ||
data { form_data.to_json } | ||
data { data_hash.to_json } | ||
|
||
factory :dynamic_power_of_attorney_form do | ||
data do | ||
transient do | ||
data_hash do | ||
{ | ||
authorizations: { | ||
record_disclosure: Faker::Boolean.boolean, | ||
|
@@ -101,7 +136,19 @@ | |
phone: Faker::PhoneNumber.phone_number, | ||
email: Faker::Internet.email | ||
} | ||
}.to_json | ||
} | ||
end | ||
end | ||
|
||
trait :with_veteran_claimant do | ||
transient do | ||
data_hash { veteran_claimant_data_hash } | ||
end | ||
end | ||
|
||
trait :with_dependent_claimant do | ||
transient do | ||
data_hash { dependent_claimant_data_hash } | ||
end | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.