Skip to content

Commit

Permalink
fine to submit a contract with draft rate now
Browse files Browse the repository at this point in the history
  • Loading branch information
mojotalantikite committed Mar 6, 2024
1 parent e5380b7 commit f97c603
Showing 1 changed file with 0 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit f97c603

Please sign in to comment.