-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '10339-story' into 10339-test
- Loading branch information
Showing
11 changed files
with
178 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
shared/src/business/utilities/getCaseDescription.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
import { getCaseDescription } from '@shared/business/utilities/getCaseDescription'; | ||
|
||
const caseTypesWithIrsNotice = [ | ||
{ | ||
description: 'Notice of Deficiency', | ||
type: 'Deficiency', | ||
}, | ||
{ | ||
description: 'Notice of Determination Concerning Collection Action', | ||
type: 'CDP (Lien/Levy)', | ||
}, | ||
{ | ||
description: 'Other', | ||
type: 'Other', | ||
}, | ||
{ | ||
description: 'Adjustment of Partnership Items Code Section 6228', | ||
type: 'Partnership (Section 6228)', | ||
}, | ||
{ | ||
description: | ||
'Notice - We Are Going To Make Your Determination Letter Available for Public Inspection', | ||
type: 'Disclosure2', | ||
}, | ||
{ | ||
description: | ||
'Notice of Certification of Your Seriously Delinquent Federal Tax Debt to the Department of State', | ||
type: 'Passport', | ||
}, | ||
{ | ||
description: | ||
'Notice of Determination Concerning Relief From Joint and Several Liability Under Section 6015', | ||
type: 'Innocent Spouse', | ||
}, | ||
{ | ||
description: 'Notice of Determination of Worker Classification', | ||
type: 'Worker Classification', | ||
}, | ||
{ | ||
description: | ||
'Notice of Determination Under Section 7623 Concerning Whistleblower Action', | ||
type: 'Whistleblower', | ||
}, | ||
{ | ||
description: | ||
'Notice of Final Determination for Full or Partial Disallowance of Interest Abatement Claim', | ||
type: 'Interest Abatement', | ||
}, | ||
{ | ||
description: 'Notice of Intention to Disclose', | ||
type: 'Disclosure1', | ||
}, | ||
{ | ||
description: 'Partnership Action Under BBA Section 1101', | ||
type: 'Partnership (BBA Section 1101)', | ||
}, | ||
{ | ||
description: 'Readjustment of Partnership Items Code Section 6226', | ||
type: 'Partnership (Section 6226)', | ||
}, | ||
]; | ||
|
||
const caseTypesWithoutIrsNotice = [ | ||
{ description: 'Deficiency', type: 'Deficiency' }, | ||
{ description: 'Collection (Lien/Levy)', type: 'CDP (Lien/Levy)' }, | ||
{ description: 'Passport', type: 'Passport' }, | ||
{ description: 'Innocent Spouse', type: 'Innocent Spouse' }, | ||
{ description: 'Whistleblower', type: 'Whistleblower' }, | ||
{ description: 'Worker Classification', type: 'Worker Classification' }, | ||
{ | ||
description: 'Declaratory Judgment (Retirement Plan)', | ||
type: 'Declaratory Judgment (Retirement Plan)', | ||
}, | ||
{ | ||
description: 'Declaratory Judgment (Exempt Organization)', | ||
type: 'Declaratory Judgment (Exempt Organization)', | ||
}, | ||
{ description: 'Disclosure', type: 'Disclosure' }, | ||
{ | ||
description: | ||
'Interest Abatement - Failure of IRS to Make Final Determination Within 180 Days After Claim for Abatement', | ||
type: 'Interest Abatement', | ||
}, | ||
{ description: 'Other', type: 'Other' }, | ||
]; | ||
|
||
describe('getCaseDescription', () => { | ||
describe('With IRS notices', () => { | ||
const hasIrsNotice = true; | ||
caseTypesWithIrsNotice.forEach(caseType => { | ||
it(`should return case description for ${caseType.type}`, () => { | ||
const caseDescription = getCaseDescription(hasIrsNotice, caseType.type); | ||
expect(caseDescription).toEqual(caseType.description); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('Without IRS notices', () => { | ||
const hasIrsNotice = false; | ||
caseTypesWithoutIrsNotice.forEach(caseType => { | ||
it(`should return case description for ${caseType.type}`, () => { | ||
const caseDescription = getCaseDescription(hasIrsNotice, caseType.type); | ||
expect(caseDescription).toEqual(caseType.description); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { | ||
CASE_TYPE_DESCRIPTIONS_WITHOUT_IRS_NOTICE, | ||
CASE_TYPE_DESCRIPTIONS_WITH_IRS_NOTICE, | ||
} from '../entities/EntityConstants'; | ||
|
||
export const getCaseDescription = ( | ||
hasIrsNotice: boolean, | ||
originalCaseType: string, | ||
) => { | ||
if (hasIrsNotice) { | ||
return CASE_TYPE_DESCRIPTIONS_WITH_IRS_NOTICE[originalCaseType]; | ||
} | ||
return CASE_TYPE_DESCRIPTIONS_WITHOUT_IRS_NOTICE[originalCaseType]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters