Skip to content
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

Show the ol and claimant entered DOB #3491

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@ def provider_entered_claimant_name
claim.eligibility.practitioner_name
end

def practitioner_entered_dob
claim.date_of_birth
end

def one_login_claimant_name
claim.onelogin_idv_full_name
end

def one_login_claimant_dob
claim.onelogin_idv_date_of_birth
end

def practitioner_journey_completed?
claim.eligibility.practitioner_journey_completed?
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,34 @@
</h3>

<table class="govuk-table">
<thead class="govuk-table__head">
<tr class="govuk-table__row">
<th class="govuk-table__cell">Claimant identity check</th>
<th class="govuk-table__cell">Full name</th>
<th class="govuk-table__cell">Date of birth</th>
</tr>
</thead>
<tbody class="govuk-table__body">
<tr class="govuk-table__row">
<th scope="row" class="govuk-table__header">
Provider entered claimant name
One Login identity verification (IDV)
</th>
<td class="govuk-table__cell">
<%= @tasks_presenter.provider_entered_claimant_name %>
<%= @tasks_presenter.one_login_claimant_name %>
</td>
<td class="govuk-table__cell">
<%= @tasks_presenter.one_login_claimant_dob %>
</td>
</tr>
<tr class="govuk-table__row">
<th scope="row" class="govuk-table__header">
Claimant name from One login
Provider entered claimant name
</th>
<td class="govuk-table__cell">
<%= @tasks_presenter.one_login_claimant_name %>
<%= @tasks_presenter.provider_entered_claimant_name %>
</td>
<td class="govuk-table__cell">
<%= @tasks_presenter.practitioner_entered_dob %>
</td>
</tr>
</tbody>
Expand Down
12 changes: 6 additions & 6 deletions spec/features/admin/admin_ey_tasks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
click_on "Confirm the claimant made the claim"

expect(page).to have_content(
"Provider entered claimant name Bobby Bobberson"
"Provider entered claimant name Bobby Bobberson 1986-01-01"
)

expect(page).to have_content(
"Claimant name from One login Bobby Bobberson"
"One Login identity verification (IDV) Bobby Bobberson 1986-01-01"
)

expect(page).to have_content(
Expand Down Expand Up @@ -90,11 +90,11 @@
click_on "Confirm the claimant made the claim"

expect(page).to have_content(
"Provider entered claimant name Bobby Bobberson"
"Provider entered claimant name Bobby Bobberson 1986-01-01"
)

expect(page).to have_content(
"Claimant name from One login Robby Bobberson"
"One Login identity verification (IDV) Robby Bobberson 1986-01-01"
)

expect(page).to have_content(
Expand Down Expand Up @@ -166,11 +166,11 @@
click_on "Confirm the claimant made the claim"

expect(page).to have_content(
"Provider entered claimant name Bobby Bobberson"
"Provider entered claimant name Bobby Bobberson 1986-01-01"
)

expect(page).to have_content(
"Claimant name from One login Robby Robberson"
"One Login identity verification (IDV) Robby Robberson 1986-01-01"
)

expect(page).to have_content(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,34 @@
expect(subject[1][1]).to eq "1 January 2018"
end
end

describe "#practitioner_entered_dob" do
let(:claim) do
create(
:claim,
:submitted,
policy: Policies::EarlyYearsPayments,
date_of_birth: Date.new(1990, 1, 1)
)
end

subject { described_class.new(claim).practitioner_entered_dob }

it { is_expected.to eq Date.new(1990, 1, 1) }
end

describe "#one_login_claimant_dob" do
let(:claim) do
create(
:claim,
:submitted,
policy: Policies::EarlyYearsPayments,
onelogin_idv_date_of_birth: Date.new(1990, 2, 1)
)
end

subject { described_class.new(claim).one_login_claimant_dob }

it { is_expected.to eq Date.new(1990, 2, 1) }
end
end
Loading