Skip to content

Commit be1c9e4

Browse files
authored
VED-397 failing NHS numbers (#1004)
1 parent 11408c9 commit be1c9e4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/e2e/test_create_immunization.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,18 @@ def test_invalid_nhs_number(self):
8181
response = self.default_imms_api.create_immunization(imms, expected_status_code=400)
8282
self.assertEqual(response.status_code, 400)
8383

84+
def test_valid_nhs_number_no_pds(self):
85+
"""it should accept the request if nhs-number is valid but was previously known to have been
86+
notified as non-existent by PDS"""
87+
valid_nhs_number = "9462206376"
88+
imms = generate_imms_resource(nhs_number=valid_nhs_number)
89+
90+
response = self.default_imms_api.create_immunization(imms)
91+
92+
self.assertEqual(response.status_code, 201, response.text)
93+
self.assertEqual(response.text, "")
94+
self.assertTrue("Location" in response.headers)
95+
8496
def test_validation(self):
8597
"""it should validate Immunization"""
8698
# NOTE: This e2e test is here to prove validation logic is wired to the backend.

0 commit comments

Comments
 (0)