File tree Expand file tree Collapse file tree
packages/backend/src/__tests__/usagers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import app from "../../app";
1010import checkJwt from "../../middlewares/checkJWT" ;
1111import { mailService } from "../../services/mail" ;
1212import { User , UserRequest } from "../../types/request" ;
13+ import { AgrementsRepository } from "../../usagers/agrements/agrements.repository" ;
1314import { AgrementService } from "../../usagers/agrements/agrements.service" ;
1415import { buildAgrementFixture } from "../helper/fixtures/agrementsFixture" ;
1516import {
@@ -64,6 +65,12 @@ describe("GET /agrements/", () => {
6465 expect ( response . status ) . toBe ( 200 ) ;
6566 expect ( response . body . agrements ) . not . toBeNull ( ) ;
6667 expect ( response . body . agrements [ 0 ] . id ) . toEqual ( agrementId ) ;
68+
69+ const agrementRepo = await AgrementsRepository . getByOrganismeId ( {
70+ organismeId,
71+ withDetails : true ,
72+ } ) ;
73+ expect ( agrementRepo . id ) . toEqual ( agrementId ) ;
6774 } ) ;
6875 it ( "devrait retourner une liste avec un agrement valide à l'utilisateur connecté" , async ( ) => {
6976 const authUser = await createUsagersUser ( ) ;
You can’t perform that action at this time.
0 commit comments