Skip to content

Commit d986fe2

Browse files
test: add tests for the NHS number on the patient session page
1 parent 02a2a6c commit d986fe2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

spec/components/app_patient_summary_component_spec.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@
1919

2020
it { should have_content("SELDON, Hari") }
2121

22+
it { should have_content("NHS number") }
23+
24+
context "when patient has an NHS number" do
25+
before { patient.update(nhs_number: "9993425389") }
26+
27+
it { should have_content("999 342 5389") }
28+
it { should_not have_link("Add the child's NHS number") }
29+
end
30+
31+
context "when patient does not have an NHS number" do
32+
before { patient.update(nhs_number: nil) }
33+
34+
it { should have_link("Add the child's NHS number") }
35+
end
36+
2237
it { should have_content("Date of birth") }
2338
it { should have_content("1 January 2000") }
2439

0 commit comments

Comments
 (0)