Skip to content

Commit

Permalink
fix(api): adapt test et snapshot after renaming Chorus to chorus
Browse files Browse the repository at this point in the history
  • Loading branch information
gcarra committed Jan 29, 2025
1 parent ba35a52 commit cde4eb1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { PAYMENT_FLAT_ENTITY } from "./__fixtures__/paymentFlatEntity.fixture";
import { PAYMENT_FLAT_DBO } from "./__fixtures__/paymentFlatDbo.fixture";
import paymentFlatPort from "./paymentFlat.port";
import { ObjectId } from "mongodb";
import PaymentFlatAdapter from "../../../modules/paymentFlat/paymentFlatAdapter";
import PaymentsFlatAdapter from "./PaymentFlat.adapter";
const mockDeleteMany = jest.fn();
const mockInsertOne = jest.fn();
Expand Down Expand Up @@ -57,13 +56,13 @@ describe("PaymentFlat Port", () => {

it("should call cursorFind with provider filter", () => {
paymentFlatPort.cursorFindChorusOnly();
expect(mockCursorFind).toHaveBeenCalledWith({ provider: "Chorus" });
expect(mockCursorFind).toHaveBeenCalledWith({ provider: "chorus" });
});

it("should call cursorFind with provider and exerciceBudgetaire filter", () => {
const exerciceBudgetaire = 2021;
paymentFlatPort.cursorFindChorusOnly(exerciceBudgetaire);
expect(mockCursorFind).toHaveBeenCalledWith({ provider: "Chorus", exerciceBudgetaire: exerciceBudgetaire });
expect(mockCursorFind).toHaveBeenCalledWith({ provider: "chorus", exerciceBudgetaire: exerciceBudgetaire });
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const PAYMENT_FLAT_ENTITY = new PaymentFlatEntity(
"UO DGER XXXX-C001", // centre financier libelle
"BRET", // attachement comptable
"0001821732", // EJ
"Chorus", // provider
"chorus", // provider
"Programme Exemple", // program
101, // program number
"Mission Exemple", // mission
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Array [
"montant": 152587.1,
"numeroProgramme": 143,
"programme": "programme_1",
"provider": "Chorus",
"provider": "chorus",
"regionAttachementComptable": "Bretagne",
"sigleMinistere": "sigle_ministere_1",
"typeIdEntrepriseBeneficiaire": "siren",
Expand All @@ -49,7 +49,7 @@ Array [
"montant": 89988.3,
"numeroProgramme": 101,
"programme": null,
"provider": "Chorus",
"provider": "chorus",
"regionAttachementComptable": "Normandie",
"sigleMinistere": null,
"typeIdEntrepriseBeneficiaire": "siren",
Expand All @@ -76,7 +76,7 @@ Array [
"montant": 62655.2,
"numeroProgramme": 102,
"programme": null,
"provider": "Chorus",
"provider": "chorus",
"regionAttachementComptable": "Bretagne",
"sigleMinistere": null,
"typeIdEntrepriseBeneficiaire": "siren",
Expand Down Expand Up @@ -108,7 +108,7 @@ Array [
"montant": 152587.1,
"numeroProgramme": 143,
"programme": "programme_1",
"provider": "Chorus",
"provider": "chorus",
"regionAttachementComptable": "Bretagne",
"sigleMinistere": "sigle_ministere_1",
"typeIdEntrepriseBeneficiaire": "siren",
Expand All @@ -135,7 +135,7 @@ Array [
"montant": 89988.3,
"numeroProgramme": 101,
"programme": null,
"provider": "Chorus",
"provider": "chorus",
"regionAttachementComptable": "Normandie",
"sigleMinistere": null,
"typeIdEntrepriseBeneficiaire": "siren",
Expand All @@ -162,7 +162,7 @@ Array [
"montant": 62655.2,
"numeroProgramme": 102,
"programme": null,
"provider": "Chorus",
"provider": "chorus",
"regionAttachementComptable": "Bretagne",
"sigleMinistere": null,
"typeIdEntrepriseBeneficiaire": "siren",
Expand Down

0 comments on commit cde4eb1

Please sign in to comment.