diff --git a/shared/src/business/useCases/validateCaseDetailInteractor.test.js b/shared/src/business/useCases/validateCaseDetailInteractor.test.js index 076c4991321..7b6b080e636 100644 --- a/shared/src/business/useCases/validateCaseDetailInteractor.test.js +++ b/shared/src/business/useCases/validateCaseDetailInteractor.test.js @@ -76,87 +76,6 @@ describe('validate case detail', () => { expect(errors.payGovDate).toBeTruthy(); }); - xit('returns an error if yearAmounts is missing a required value', () => { - const errors = validateCaseDetail({ - caseDetail: { - caseType: 'defined', - docketNumber: '101-18', - documents: [ - { - createdAt: '2018-11-21T20:49:28.192Z', - documentId: 'c6b81f4d-1e47-423a-8caf-6d2fdc3d3859', - documentType: 'Petition', - reviewDate: '2018-11-21T20:49:28.192Z', - reviewUser: 'petitionsclerk', - role: 'petitioner', - userId: 'taxpayer', - workItems: [], - }, - { - createdAt: '2018-11-21T20:49:28.192Z', - documentId: 'c6b81f4d-1e47-423a-8caf-6d2fdc3d3859', - documentType: 'Petition', - reviewDate: '2018-11-21T20:49:28.192Z', - reviewUser: 'petitionsclerk', - role: 'petitioner', - userId: 'taxpayer', - workItems: [], - }, - ], - filingType: 'defined', - hasIrsNotice: true, - irsNoticeDate: new Date().toISOString(), - petitioners: [{ name: 'user' }], - procedureType: 'defined', - signature: true, - yearAmounts: [ - { - amount: '123', - }, - { - year: '1236-01-01', - }, - { - amount: '1000', - year: '1234-01-01', - }, - { - amount: '1000', - year: '2100-01-01', - }, - { - amount: '123', - year: '2200-01-01', - }, - ], - }, - }); - expect(errors.preferredTrialCity).toEqual( - 'Preferred Trial City is required.', - ); - - const yearAmount0 = errors.yearAmounts.find( - yearAmount => yearAmount.index === 0, - ); - - const yearAmount3 = errors.yearAmounts.find( - yearAmount => yearAmount.index === 3, - ); - - const yearAmount4 = errors.yearAmounts.find( - yearAmount => yearAmount.index === 4, - ); - expect(yearAmount0.year).toEqual('Please enter a valid year.'); - expect(yearAmount0.amount).toBeUndefined(); - expect(yearAmount3.year).toEqual( - 'That year is in the future. Please enter a valid year.', - ); - expect(yearAmount4.year).toEqual( - 'That year is in the future. Please enter a valid year.', - ); - expect(yearAmount4.index).toEqual(4); - }); - it('returns an error if yearAmounts have duplicate years', () => { const errors = validateCaseDetail({ caseDetail: {