Skip to content

Commit

Permalink
fix(api): prisma queries used in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasDos committed Jul 15, 2024
1 parent a5ac61a commit dbfc08c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ beforeAll(async () => {
feasibility = await prismaClient.feasibility.create({
data: {
candidacyId: candidacy.id,
feasibilityFileId: feasibilityFile.id,
feasibilityUploadedPdf: {
create: {
feasibilityFileId: feasibilityFile.id,
},
},
certificationAuthorityId: certificationAuthority.id,
},
});
Expand Down
6 changes: 5 additions & 1 deletion packages/reva-api/modules/feasibility/feasibility.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ async function createFeasibility(account: Account) {
return await prismaClient.feasibility.create({
data: {
candidacyId: candidacy.id,
feasibilityFileId: feasibilityFile.id,
feasibilityUploadedPdf: {
create: {
feasibilityFileId: feasibilityFile.id,
},
},
certificationAuthorityId: account.certificationAuthorityId ?? "",
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ describe("FundingRequesUnifvae Feasibility checks", () => {
create: {
decision: "ADMISSIBLE",
certificationAuthority: { create: { label: "dummy" } },
feasibilityFile: {
feasibilityUploadedPdf: {
create: {
name: "dummyFile.ext",
mimeType: "kikoo/lol",
path: "dummyFile.ext",
feasibilityFile: {
create: {
name: "dummyFile.ext",
mimeType: "kikoo/lol",
path: "dummyFile.ext",
},
},
},
},
},
Expand All @@ -38,11 +42,15 @@ describe("FundingRequesUnifvae Feasibility checks", () => {
create: {
decision: "REJECTED",
certificationAuthority: { create: { label: "dummy" } },
feasibilityFile: {
feasibilityUploadedPdf: {
create: {
name: "dummyFile.ext",
mimeType: "kikoo/lol",
path: "dummyFile.ext",
feasibilityFile: {
create: {
name: "dummyFile.ext",
mimeType: "kikoo/lol",
path: "dummyFile.ext",
},
},
},
},
},
Expand All @@ -55,11 +63,15 @@ describe("FundingRequesUnifvae Feasibility checks", () => {
create: {
decision: "PENDING",
certificationAuthority: { create: { label: "dummy" } },
feasibilityFile: {
feasibilityUploadedPdf: {
create: {
name: "dummyFile.ext",
mimeType: "kikoo/lol",
path: "dummyFile.ext",
feasibilityFile: {
create: {
name: "dummyFile.ext",
mimeType: "kikoo/lol",
path: "dummyFile.ext",
},
},
},
},
},
Expand Down

0 comments on commit dbfc08c

Please sign in to comment.