Skip to content

Commit

Permalink
remove unneeded test
Browse files Browse the repository at this point in the history
  • Loading branch information
wbyoko committed Mar 12, 2019
1 parent 6e6e993 commit 9f1e31a
Showing 1 changed file with 0 additions and 81 deletions.
81 changes: 0 additions & 81 deletions shared/src/business/useCases/validateCaseDetailInteractor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 9f1e31a

Please sign in to comment.