Skip to content

Commit 2dacd5e

Browse files
added test : customer requesting for campaign that is not mapped
1 parent 4afb122 commit 2dacd5e

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

tests/integration/in_process/test_eligibility_endpoint.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,38 @@ def test_not_actionable_and_check_response_when_rule_mapper_is_given(
824824
),
825825
)
826826

827+
def test_response_when_no_campaign_config_is_present(
828+
self,
829+
client: FlaskClient,
830+
persisted_77yo_person: NHSNumber,
831+
campaign_config_with_rules_having_rule_mapper: CampaignConfig, # noqa: ARG002
832+
consumer_mapping: ConsumerMapping, # noqa: ARG002
833+
secretsmanager_client: BaseClient, # noqa: ARG002
834+
):
835+
# Given
836+
headers = {"nhs-login-nhs-number": str(persisted_77yo_person), CONSUMER_ID: "23-mic7heal-jor6don"}
837+
838+
# When
839+
response = client.get(f'/patient-check/{persisted_77yo_person}?includeActions=N&conditions=FLU',
840+
headers=headers)
841+
842+
# Then
843+
assert_that(
844+
response,
845+
is_response()
846+
.with_status_code(HTTPStatus.OK)
847+
.and_text(
848+
is_json_that(
849+
has_entry(
850+
"processedSuggestions",
851+
equal_to(
852+
[]
853+
),
854+
)
855+
)
856+
),
857+
)
858+
827859

828860
class TestEligibilityResponseWhenConsumerHasNoMapping:
829861
def test_empty_response_when_no_campaign_mapped_for_the_consumer(

0 commit comments

Comments
 (0)