Skip to content

Commit 2896bb9

Browse files
Merge pull request #949 from flexion/separate-tests
separate petition contact tests into valid/invalid
2 parents 846a72e + d05a643 commit 2896bb9

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

shared/src/business/entities/Contacts/PetitionContacts.test.js

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ describe('Petition', () => {
141141
expect(petition.isValid()).toEqual(true);
142142
});
143143

144-
it('can validate Partnership (BBA Regime) contact', () => {
144+
it('can validate invalid Partnership (BBA Regime) contact', () => {
145145
petition = new Petition({
146146
caseType: 'other',
147147
procedureType: 'Small',
@@ -153,6 +153,9 @@ describe('Petition', () => {
153153
partyType: 'Partnership (BBA Regime)',
154154
});
155155
expect(petition.isValid()).toEqual(false);
156+
});
157+
158+
it('can validate valid Partnership (BBA Regime) contact', () => {
156159
petition = new Petition({
157160
caseType: 'other',
158161
procedureType: 'Small',
@@ -185,7 +188,7 @@ describe('Petition', () => {
185188
expect(petition.isValid()).toEqual(true);
186189
});
187190

188-
it('can validate Trust', () => {
191+
it('can validate invalid Trust contact', () => {
189192
petition = new Petition({
190193
caseType: 'other',
191194
procedureType: 'Small',
@@ -197,6 +200,9 @@ describe('Petition', () => {
197200
partyType: 'Trust',
198201
});
199202
expect(petition.isValid()).toEqual(false);
203+
});
204+
205+
it('can validate valid Trust contact', () => {
200206
petition = new Petition({
201207
caseType: 'other',
202208
procedureType: 'Small',
@@ -229,7 +235,7 @@ describe('Petition', () => {
229235
expect(petition.isValid()).toEqual(true);
230236
});
231237

232-
it('can validate Conservator contact', () => {
238+
it('can validate invalid Conservator contact', () => {
233239
petition = new Petition({
234240
caseType: 'other',
235241
procedureType: 'Small',
@@ -241,6 +247,9 @@ describe('Petition', () => {
241247
partyType: 'Conservator',
242248
});
243249
expect(petition.isValid()).toEqual(false);
250+
});
251+
252+
it('can validate valid Conservator contact', () => {
244253
petition = new Petition({
245254
caseType: 'other',
246255
procedureType: 'Small',
@@ -273,7 +282,7 @@ describe('Petition', () => {
273282
expect(petition.isValid()).toEqual(true);
274283
});
275284

276-
it('can validate Guardian contact', () => {
285+
it('can validate invalid Guardian contact', () => {
277286
petition = new Petition({
278287
caseType: 'other',
279288
procedureType: 'Small',
@@ -285,7 +294,9 @@ describe('Petition', () => {
285294
partyType: 'Guardian',
286295
});
287296
expect(petition.isValid()).toEqual(false);
297+
});
288298

299+
it('can validate valid Guardian contact', () => {
289300
petition = new Petition({
290301
caseType: 'other',
291302
procedureType: 'Small',
@@ -318,7 +329,7 @@ describe('Petition', () => {
318329
expect(petition.isValid()).toEqual(true);
319330
});
320331

321-
it('can validate Custodian contact', () => {
332+
it('can validate invalid Custodian contact', () => {
322333
let petition = new Petition({
323334
caseType: 'other',
324335
procedureType: 'Small',
@@ -330,7 +341,9 @@ describe('Petition', () => {
330341
partyType: 'Custodian',
331342
});
332343
expect(petition.isValid()).toEqual(false);
344+
});
333345

346+
it('can validate valid Custodian contact', () => {
334347
petition = new Petition({
335348
caseType: 'other',
336349
procedureType: 'Small',
@@ -363,7 +376,7 @@ describe('Petition', () => {
363376
expect(petition.isValid()).toEqual(true);
364377
});
365378

366-
it('can validate Donor contact', () => {
379+
it('can validate invalid Donor contact', () => {
367380
let petition = new Petition({
368381
caseType: 'other',
369382
procedureType: 'Small',
@@ -375,7 +388,9 @@ describe('Petition', () => {
375388
partyType: 'Donor',
376389
});
377390
expect(petition.isValid()).toEqual(false);
391+
});
378392

393+
it('can validate valid Donor contact', () => {
379394
petition = new Petition({
380395
caseType: 'other',
381396
procedureType: 'Small',
@@ -399,7 +414,7 @@ describe('Petition', () => {
399414
expect(petition.isValid()).toEqual(true);
400415
});
401416

402-
it('can validate Transferee contact', () => {
417+
it('can validate invalid Transferee contact', () => {
403418
let petition = new Petition({
404419
caseType: 'other',
405420
procedureType: 'Small',
@@ -411,7 +426,9 @@ describe('Petition', () => {
411426
partyType: 'Transferee',
412427
});
413428
expect(petition.isValid()).toEqual(false);
429+
});
414430

431+
it('can validate valid Transferee contact', () => {
415432
petition = new Petition({
416433
caseType: 'other',
417434
procedureType: 'Small',

0 commit comments

Comments
 (0)