Skip to content

Commit

Permalink
Merge branch 'trunk' into ticket_187861517
Browse files Browse the repository at this point in the history
  • Loading branch information
saipraveen18 committed Jul 31, 2024
2 parents 9a764cb + fa5d7af commit c02ce07
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,13 @@ def build_event(payload)
end

def record_verification_history
@family.family_members.each do |member|
message = "DMF Determination request for Family with hbx_id #{@family.hbx_assigned_id} is submitted"
active_family_members = @family.family_members.active
active_family_members.each do |member|
message = "DMF Determination submitted"
person = member.person
alive_status_type = person.verification_types.alive_status_type.first
next unless alive_status_type

alive_status_type.add_type_history_element(action: "DMF_Request_Submitted", modifier: "System", update_reason: message)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,21 @@
expect(family.transactions.count).to eq 1
end
end

context 'person without alive status' do
before do
family
person.verification_types.delete_all
job.create_process_status
Operations::Eligibilities::BuildFamilyDetermination.new.call({effective_date: Date.today, family: family})
family.eligibility_determination.subjects[0].eligibility_states.last.update(is_eligible: true)
@result = described_class.new.call(payload)
end

it "should not create a verification type history element for primary" do
person.reload
expect(person.verification_types.count).to eq 0
expect(@result.success?).to eq true
end
end
end

0 comments on commit c02ce07

Please sign in to comment.