Skip to content

Commit

Permalink
Merge pull request #949 from flexion/separate-tests
Browse files Browse the repository at this point in the history
separate petition contact tests into valid/invalid
  • Loading branch information
rachaelparris authored Feb 26, 2019
2 parents 846a72e + d05a643 commit 2896bb9
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions shared/src/business/entities/Contacts/PetitionContacts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ describe('Petition', () => {
expect(petition.isValid()).toEqual(true);
});

it('can validate Partnership (BBA Regime) contact', () => {
it('can validate invalid Partnership (BBA Regime) contact', () => {
petition = new Petition({
caseType: 'other',
procedureType: 'Small',
Expand All @@ -153,6 +153,9 @@ describe('Petition', () => {
partyType: 'Partnership (BBA Regime)',
});
expect(petition.isValid()).toEqual(false);
});

it('can validate valid Partnership (BBA Regime) contact', () => {
petition = new Petition({
caseType: 'other',
procedureType: 'Small',
Expand Down Expand Up @@ -185,7 +188,7 @@ describe('Petition', () => {
expect(petition.isValid()).toEqual(true);
});

it('can validate Trust', () => {
it('can validate invalid Trust contact', () => {
petition = new Petition({
caseType: 'other',
procedureType: 'Small',
Expand All @@ -197,6 +200,9 @@ describe('Petition', () => {
partyType: 'Trust',
});
expect(petition.isValid()).toEqual(false);
});

it('can validate valid Trust contact', () => {
petition = new Petition({
caseType: 'other',
procedureType: 'Small',
Expand Down Expand Up @@ -229,7 +235,7 @@ describe('Petition', () => {
expect(petition.isValid()).toEqual(true);
});

it('can validate Conservator contact', () => {
it('can validate invalid Conservator contact', () => {
petition = new Petition({
caseType: 'other',
procedureType: 'Small',
Expand All @@ -241,6 +247,9 @@ describe('Petition', () => {
partyType: 'Conservator',
});
expect(petition.isValid()).toEqual(false);
});

it('can validate valid Conservator contact', () => {
petition = new Petition({
caseType: 'other',
procedureType: 'Small',
Expand Down Expand Up @@ -273,7 +282,7 @@ describe('Petition', () => {
expect(petition.isValid()).toEqual(true);
});

it('can validate Guardian contact', () => {
it('can validate invalid Guardian contact', () => {
petition = new Petition({
caseType: 'other',
procedureType: 'Small',
Expand All @@ -285,7 +294,9 @@ describe('Petition', () => {
partyType: 'Guardian',
});
expect(petition.isValid()).toEqual(false);
});

it('can validate valid Guardian contact', () => {
petition = new Petition({
caseType: 'other',
procedureType: 'Small',
Expand Down Expand Up @@ -318,7 +329,7 @@ describe('Petition', () => {
expect(petition.isValid()).toEqual(true);
});

it('can validate Custodian contact', () => {
it('can validate invalid Custodian contact', () => {
let petition = new Petition({
caseType: 'other',
procedureType: 'Small',
Expand All @@ -330,7 +341,9 @@ describe('Petition', () => {
partyType: 'Custodian',
});
expect(petition.isValid()).toEqual(false);
});

it('can validate valid Custodian contact', () => {
petition = new Petition({
caseType: 'other',
procedureType: 'Small',
Expand Down Expand Up @@ -363,7 +376,7 @@ describe('Petition', () => {
expect(petition.isValid()).toEqual(true);
});

it('can validate Donor contact', () => {
it('can validate invalid Donor contact', () => {
let petition = new Petition({
caseType: 'other',
procedureType: 'Small',
Expand All @@ -375,7 +388,9 @@ describe('Petition', () => {
partyType: 'Donor',
});
expect(petition.isValid()).toEqual(false);
});

it('can validate valid Donor contact', () => {
petition = new Petition({
caseType: 'other',
procedureType: 'Small',
Expand All @@ -399,7 +414,7 @@ describe('Petition', () => {
expect(petition.isValid()).toEqual(true);
});

it('can validate Transferee contact', () => {
it('can validate invalid Transferee contact', () => {
let petition = new Petition({
caseType: 'other',
procedureType: 'Small',
Expand All @@ -411,7 +426,9 @@ describe('Petition', () => {
partyType: 'Transferee',
});
expect(petition.isValid()).toEqual(false);
});

it('can validate valid Transferee contact', () => {
petition = new Petition({
caseType: 'other',
procedureType: 'Small',
Expand Down

0 comments on commit 2896bb9

Please sign in to comment.