From f97c60379a6cc0cee3d2d618a20bcf8a431ee198 Mon Sep 17 00:00:00 2001 From: Mojo Talantikite Date: Wed, 6 Mar 2024 17:02:43 -0500 Subject: [PATCH] fine to submit a contract with draft rate now --- .../contractAndRates/unlockContract.test.ts | 59 ------------------- 1 file changed, 59 deletions(-) diff --git a/services/app-api/src/postgres/contractAndRates/unlockContract.test.ts b/services/app-api/src/postgres/contractAndRates/unlockContract.test.ts index d77c5450d9..cdc0ae8559 100644 --- a/services/app-api/src/postgres/contractAndRates/unlockContract.test.ts +++ b/services/app-api/src/postgres/contractAndRates/unlockContract.test.ts @@ -373,65 +373,6 @@ describe('unlockContract', () => { submittedRate.revisions[0].id ) }) - it('errors when submitting a contract that has a draft rate', async () => { - const client = await sharedTestPrismaClient() - - const stateUser = await client.user.create({ - data: { - id: uuidv4(), - givenName: 'Aang', - familyName: 'Avatar', - email: 'aang@example.com', - role: 'STATE_USER', - stateCode: 'NM', - }, - }) - - const draftContractData = mockInsertContractArgs({ - submissionDescription: 'Contract 1.0', - }) - - //Creat a draft contract and draft rate - const contract = must( - await insertDraftContract(client, draftContractData) - ) - const rate = must( - await insertDraftRate(client, { - stateCode: 'MN', - rateCertificationName: 'rate 1.0', - }) - ) - - if (!rate.draftRevision) { - throw new Error( - 'Unexpected error: draft rate is missing a draftRevision.' - ) - } - - // Connect draft contract to submitted rate - must( - await updateDraftContractWithRates(client, { - contractID: contract.id, - formData: { - submissionType: 'CONTRACT_AND_RATES', - submissionDescription: 'contract 1.0', - contractType: 'BASE', - programIDs: ['PMAP'], - populationCovered: 'MEDICAID', - riskBasedContract: false, - }, - rateFormDatas: [rate.draftRevision?.formData], - }) - ) - - // Submit contract - const submittedContract = await submitContract(client, { - contractID: contract.id, - submittedByUserID: stateUser.id, - submittedReason: 'Submit contract 1.0', - }) - expect(submittedContract).toBeInstanceOf(Error) - }) it('errors when unlocking a draft contract or rate', async () => { const client = await sharedTestPrismaClient()