-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Will/appeals 63607 #23488
base: main
Are you sure you want to change the base?
Will/appeals 63607 #23488
Changes from 145 commits
7633846
7a2f947
f9c04d8
c91ddf8
b6bd723
51abc5e
580f725
cea711f
f4c32f2
bb790ee
0a3b620
fd26a8a
c4d1a49
40e6bbb
f6a58fa
3efde93
a0f439f
4577fb9
8b67337
79cef69
7f82f6e
50d1db3
57302b7
b538a70
260590a
565c2ea
63453cf
ff161fd
e018f1d
62397be
884b1c0
17b89cc
64ed446
7733c4b
3827b60
8143e3f
290e80a
05777f1
bf220e1
9882434
f8dd3c6
77c14d1
11cd7c9
99db704
9148093
fd49f77
bf0b13d
578a25a
0ffb23b
4cfffed
78e47ec
39bf8b1
9ebba7f
87e2e46
4d40d05
04282c8
6fbfd20
39a087f
1205dff
12b33f1
2099b27
66cf311
2e480f6
9f8f0ef
b01f056
0ed7092
6775316
344ad6e
b74627f
db7a594
a837dd1
ad953c2
3be9adf
bf3001e
06ec3ad
550a0df
18af3ea
bf1927d
0db023f
e87e141
b28fb17
0439702
57b6f0b
7e3426e
d7df63a
e7c97de
56b3d09
c220984
e251441
7b94448
9507897
21bc269
bf435b4
ca3bc5c
bd8cc81
2704366
64065e5
59dddbc
21296e7
85b2407
8423ccc
82f03ac
88e146a
9e99887
f983a53
adc5648
b037c59
09af622
4d6af23
fd0efc0
994a815
ad05091
3b9bd4b
ce4f9f6
a3a2c02
20498fb
0a61c06
1cf5244
ed30075
381a3b5
d6588ed
036520b
3cf76d8
7b1d7c6
25b0668
2e3fbbb
851849c
89dbe78
0c1e726
2d3fe8a
e0b58fe
c2bb786
c95ae33
4c93142
b6bd6f9
63758f2
7f2fd96
c9cd5a9
904b578
fdb9488
34fcef8
d83be11
e3f51af
62d2f5b
866bd71
58d05dd
d5b5400
cabe3b7
813caa8
7c09fa5
f2217f3
ca66a9f
72e3f8c
411eae8
6b3d977
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
allow(parser).to receive(:ineligible_to_ineligible_issues).and_return([]) | ||
allow(parser).to receive(:end_product_establishment_last_synced_at).and_return(last_synced_at) | ||
allow(parser).to receive(:end_product_establishment_code).and_return("some_end_product_code") | ||
allow(parser).to receive(:end_product_establishment_reference_id).and_return(EndProductEstablishment.last.reference_id) | ||
allow(parser).to receive(:veteran_participant_id).and_return("some_participant_id") | ||
end | ||
end | ||
|
@@ -63,6 +64,41 @@ | |
end | ||
end | ||
|
||
let(:valid_parser_issue) do | ||
instance_double(Events::DecisionReviewUpdated::DecisionReviewUpdatedIssueParser).tap do |issue| | ||
allow(issue).to receive(:ri_reference_id).and_return("some_reference_id") | ||
allow(issue).to receive(:ri_original_caseflow_request_issue_id).and_return(nil) | ||
allow(issue).to receive(:ri_benefit_type).and_return("some_benefit_type") | ||
allow(issue).to receive(:ri_closed_at).and_return(last_synced_at) | ||
allow(issue).to receive(:ri_closed_status).and_return(:ineligible) | ||
allow(issue).to receive(:ri_contested_issue_description).and_return("some_description") | ||
allow(issue).to receive(:ri_contention_reference_id).and_return(26) | ||
allow(issue).to receive(:ri_contested_rating_issue_diagnostic_code).and_return("some_diagnostic_code") | ||
allow(issue).to receive(:ri_contested_rating_decision_reference_id).and_return("some_decision_id") | ||
allow(issue).to receive(:ri_contested_rating_issue_profile_date).and_return(Time.zone.today) | ||
allow(issue).to receive(:ri_contested_rating_issue_reference_id).and_return("some_issue_id") | ||
allow(issue).to receive(:ri_contested_decision_issue_id).and_return(nil) | ||
allow(issue).to receive(:ri_decision_date).and_return(Time.zone.today) | ||
allow(issue).to receive(:ri_ineligible_due_to_id).and_return(RequestIssue.first.id) | ||
allow(issue).to receive(:ri_ineligible_reason).and_return(:untimely) | ||
allow(issue).to receive(:ri_is_unidentified).and_return(false) | ||
allow(issue).to receive(:ri_unidentified_issue_text).and_return("some_text") | ||
allow(issue).to receive(:ri_nonrating_issue_category).and_return("some_category") | ||
allow(issue).to receive(:ri_nonrating_issue_description).and_return("some_description") | ||
allow(issue).to receive(:ri_nonrating_issue_bgs_id).and_return("some_bgs_id") | ||
allow(issue).to receive(:ri_nonrating_issue_bgs_source).and_return("some_source") | ||
allow(issue).to receive(:ri_ramp_claim_id).and_return("some_claim_id") | ||
allow(issue).to receive(:ri_rating_issue_associated_at).and_return(last_synced_at) | ||
allow(issue).to receive(:ri_untimely_exemption).and_return(false) | ||
allow(issue).to receive(:ri_untimely_exemption_notes).and_return("some_notes") | ||
allow(issue).to receive(:ri_vacols_id).and_return("some_vacols_id") | ||
allow(issue).to receive(:ri_vacols_sequence_id).and_return(453) | ||
allow(issue).to receive(:ri_type).and_return("some_type") | ||
allow(issue).to receive(:ri_edited_description).and_return("Edited description") | ||
allow(issue).to receive(:ri_veteran_participant_id).and_return("some_participant_id") | ||
end | ||
end | ||
|
||
let(:issue_payload) do | ||
{ | ||
decision_review_issue_id: "some_reference_id", | ||
|
@@ -353,4 +389,98 @@ | |
expect(subject.processed_at).to eq(parser.end_product_establishment_last_synced_at) | ||
end | ||
end | ||
|
||
describe "#update_request_issue!" do | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I requested that you add a test to test the assignment of each field on the request issue update... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added that spec |
||
context "when epe is nil" do | ||
it "does not update end_product_establishment_id with epe id" do | ||
request_issue = existing_request_issue | ||
event = described_class.new( | ||
review: review, | ||
user: user, | ||
parser: parser, | ||
event: event, | ||
epe: nil | ||
) | ||
expect(request_issue.end_product_establishment_id).to eq(request_issue.end_product_establishment_id) | ||
event.update_request_issue!(request_issue, valid_parser_issue) | ||
|
||
request_issue.reload | ||
expect(request_issue.end_product_establishment_id).to eq(request_issue.end_product_establishment_id) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is testing nothing... you need to check this value before and after the update |
||
end | ||
end | ||
|
||
context "when epe is provided" do | ||
it "updates end_product_establishment_id with epe id" do | ||
request_issue = existing_request_issue | ||
|
||
event = described_class.new( | ||
review: review, | ||
user: user, | ||
parser: parser, | ||
event: event, | ||
epe: epe | ||
) | ||
expect(request_issue.end_product_establishment_id).not_to eq(epe.id) | ||
event.update_request_issue!(request_issue, valid_parser_issue) | ||
|
||
request_issue.reload | ||
expect(request_issue.end_product_establishment_id).to eq(epe.id) | ||
end | ||
end | ||
|
||
context "confirm request issue" do | ||
it "is updated with passed in data for all attributes" do | ||
request_issue = existing_request_issue | ||
|
||
event = described_class.new( | ||
review: review, | ||
user: user, | ||
parser: parser, | ||
event: event, | ||
epe: epe | ||
) | ||
event.update_request_issue!(request_issue, valid_parser_issue) | ||
|
||
request_issue.reload | ||
expect(request_issue.end_product_establishment_id).to eq(epe.id) | ||
expect(request_issue.ineligible_reason).to eq(valid_parser_issue.ri_ineligible_reason.to_s) | ||
expect(request_issue.closed_at).to eq(valid_parser_issue.ri_closed_at.to_s) | ||
expect(request_issue.closed_status).to eq(valid_parser_issue.ri_closed_status.to_s) | ||
expect(request_issue.contested_issue_description).to eq(valid_parser_issue.ri_contested_issue_description.to_s) | ||
expect(request_issue.nonrating_issue_category).to eq(valid_parser_issue.ri_nonrating_issue_category.to_s) | ||
expect(request_issue.nonrating_issue_description).to eq(valid_parser_issue.ri_nonrating_issue_description.to_s) | ||
expect(request_issue.contention_updated_at).to eq(parser.end_product_establishment_last_synced_at.to_s) | ||
expect(request_issue.contention_reference_id).to eq(valid_parser_issue.ri_contention_reference_id) | ||
expect(request_issue.contested_decision_issue_id).to eq(valid_parser_issue.ri_contested_decision_issue_id) | ||
expect(request_issue.contested_rating_issue_reference_id).to eq( | ||
valid_parser_issue.ri_contested_rating_issue_reference_id.to_s | ||
) | ||
expect(request_issue.contested_rating_issue_diagnostic_code).to eq( | ||
valid_parser_issue.ri_contested_rating_issue_diagnostic_code.to_s | ||
) | ||
expect(request_issue.contested_rating_decision_reference_id).to eq( | ||
valid_parser_issue.ri_contested_rating_decision_reference_id.to_s | ||
) | ||
expect(request_issue.contested_rating_issue_profile_date).to eq( | ||
valid_parser_issue.ri_contested_rating_issue_profile_date.to_s | ||
) | ||
expect(request_issue.nonrating_issue_bgs_source).to eq(valid_parser_issue.ri_nonrating_issue_bgs_source.to_s) | ||
expect(request_issue.nonrating_issue_bgs_id).to eq(valid_parser_issue.ri_nonrating_issue_bgs_id.to_s) | ||
expect(request_issue.unidentified_issue_text).to eq(valid_parser_issue.ri_unidentified_issue_text.to_s) | ||
expect(request_issue.vacols_sequence_id).to eq(valid_parser_issue.ri_vacols_sequence_id) | ||
expect(request_issue.ineligible_due_to_id).to eq(valid_parser_issue.ri_ineligible_due_to_id) | ||
expect(request_issue.reference_id).to eq(valid_parser_issue.ri_reference_id) | ||
expect(request_issue.rating_issue_associated_at).to eq(valid_parser_issue.ri_rating_issue_associated_at.to_s) | ||
expect(request_issue.edited_description).to eq(valid_parser_issue.ri_edited_description.to_s) | ||
expect(request_issue.ramp_claim_id).to eq(valid_parser_issue.ri_ramp_claim_id) | ||
expect(request_issue.vacols_id).to eq(valid_parser_issue.ri_vacols_id) | ||
expect(request_issue.decision_date.strftime('%Y-%m-%d')).to eq(valid_parser_issue.ri_decision_date.to_s) | ||
expect(request_issue.is_unidentified).to eq(valid_parser_issue.ri_is_unidentified) | ||
expect(request_issue.untimely_exemption).to eq(valid_parser_issue.ri_untimely_exemption) | ||
expect(request_issue.untimely_exemption_notes).to eq(valid_parser_issue.ri_untimely_exemption_notes.to_s) | ||
expect(request_issue.benefit_type).to eq(valid_parser_issue.ri_benefit_type.to_s) | ||
expect(request_issue.veteran_participant_id).to eq(valid_parser_issue.ri_veteran_participant_id) | ||
end | ||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the point of this ? we already have let(:parser_issue)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we were missing some data points and I didn't want to modify the parser_issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update the original parse to include the missing items , there is no need to create another one