Skip to content

Commit 3f7c9d0

Browse files
VIA-184 AS/EO/SB/DB Add test case for getFilteredContentForFluVaccine
1 parent 024bb71 commit 3f7c9d0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/services/content-api/parsers/content-filter-service.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
getFilteredContentForVaccine,
1111
} from "@src/services/content-api/parsers/content-filter-service";
1212
import { getFilteredContentForFluInPregnancyVaccine } from "@src/services/content-api/parsers/custom/flu-in-pregnancy";
13+
import { getFilteredContentForFluVaccine } from "@src/services/content-api/parsers/custom/flu-vaccine";
1314
import { getFilteredContentForWhoopingCoughVaccine } from "@src/services/content-api/parsers/custom/whooping-cough";
1415
import {
1516
ContentApiVaccineResponse,
@@ -24,6 +25,7 @@ import { contentWithoutBenefitsHealthAspect, contentWithoutCallout } from "@test
2425

2526
jest.mock("@src/services/content-api/parsers/custom/whooping-cough");
2627
jest.mock("@src/services/content-api/parsers/custom/flu-in-pregnancy");
28+
jest.mock("@src/services/content-api/parsers/custom/flu-vaccine");
2729

2830
describe("Content Filter", () => {
2931
describe("_extractDescriptionForVaccine", () => {
@@ -737,6 +739,14 @@ describe("Content Filter", () => {
737739
expect(getFilteredContentForWhoopingCoughVaccine).toHaveBeenCalledWith(mockApiContent);
738740
});
739741

742+
it("should call getFilteredContentForFluVaccine for flu vaccine", () => {
743+
const mockApiContent = "testContent";
744+
745+
getFilteredContentForVaccine(VaccineType.FLU_FOR_ADULTS, mockApiContent);
746+
747+
expect(getFilteredContentForFluVaccine).toHaveBeenCalledWith(mockApiContent);
748+
});
749+
740750
it("should return standard vaccine content and additional content for COVID-19 vaccine", () => {
741751
const pageCopyForCovid19Vaccine = getFilteredContentForVaccine(
742752
VaccineType.COVID_19,

0 commit comments

Comments
 (0)