Skip to content

Commit 9cfe4bf

Browse files
Return Org When Verified or Removed (canada-ca#2175)
* update org result obj * update remove org mutation to return removed org * update verify org mutation to return org * Update faker Co-authored-by: FestiveKyle <kyle.j.s.sullivan@gmail.com>
1 parent 70140ea commit 9cfe4bf

7 files changed

Lines changed: 167 additions & 0 deletions

File tree

api-js/src/organization/mutations/__tests__/remove-organization.test.js

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ describe('removing an organization', () => {
168168
result {
169169
... on OrganizationResult {
170170
status
171+
organization {
172+
name
173+
}
171174
}
172175
... on OrganizationError {
173176
code
@@ -208,6 +211,9 @@ describe('removing an organization', () => {
208211
result: {
209212
status:
210213
'Successfully removed organization: treasury-board-secretariat.',
214+
organization: {
215+
name: 'Treasury Board of Canada Secretariat',
216+
},
211217
},
212218
},
213219
},
@@ -231,6 +237,9 @@ describe('removing an organization', () => {
231237
result {
232238
... on OrganizationResult {
233239
status
240+
organization {
241+
name
242+
}
234243
}
235244
... on OrganizationError {
236245
code
@@ -308,6 +317,9 @@ describe('removing an organization', () => {
308317
result {
309318
... on OrganizationResult {
310319
status
320+
organization {
321+
name
322+
}
311323
}
312324
... on OrganizationError {
313325
code
@@ -348,6 +360,9 @@ describe('removing an organization', () => {
348360
result: {
349361
status:
350362
'Successfully removed organization: treasury-board-secretariat.',
363+
organization: {
364+
name: 'Treasury Board of Canada Secretariat',
365+
},
351366
},
352367
},
353368
},
@@ -371,6 +386,9 @@ describe('removing an organization', () => {
371386
result {
372387
... on OrganizationResult {
373388
status
389+
organization {
390+
name
391+
}
374392
}
375393
... on OrganizationError {
376394
code
@@ -456,6 +474,9 @@ describe('removing an organization', () => {
456474
result {
457475
... on OrganizationResult {
458476
status
477+
organization {
478+
name
479+
}
459480
}
460481
... on OrganizationError {
461482
code
@@ -493,6 +514,9 @@ describe('removing an organization', () => {
493514
result: {
494515
status:
495516
'Successfully removed organization: treasury-board-secretariat.',
517+
organization: {
518+
name: 'Treasury Board of Canada Secretariat',
519+
},
496520
},
497521
},
498522
},
@@ -516,6 +540,9 @@ describe('removing an organization', () => {
516540
result {
517541
... on OrganizationResult {
518542
status
543+
organization {
544+
name
545+
}
519546
}
520547
... on OrganizationError {
521548
code
@@ -622,6 +649,9 @@ describe('removing an organization', () => {
622649
result {
623650
... on OrganizationResult {
624651
status
652+
organization {
653+
name
654+
}
625655
}
626656
... on OrganizationError {
627657
code
@@ -661,6 +691,9 @@ describe('removing an organization', () => {
661691
removeOrganization: {
662692
result: {
663693
status: 'todo',
694+
organization: {
695+
name: 'Secrétariat du Conseil Trésor du Canada',
696+
},
664697
},
665698
},
666699
},
@@ -684,6 +717,9 @@ describe('removing an organization', () => {
684717
result {
685718
... on OrganizationResult {
686719
status
720+
organization {
721+
name
722+
}
687723
}
688724
... on OrganizationError {
689725
code
@@ -761,6 +797,9 @@ describe('removing an organization', () => {
761797
result {
762798
... on OrganizationResult {
763799
status
800+
organization {
801+
name
802+
}
764803
}
765804
... on OrganizationError {
766805
code
@@ -800,6 +839,9 @@ describe('removing an organization', () => {
800839
removeOrganization: {
801840
result: {
802841
status: 'todo',
842+
organization: {
843+
name: 'Secrétariat du Conseil Trésor du Canada',
844+
},
803845
},
804846
},
805847
},
@@ -823,6 +865,9 @@ describe('removing an organization', () => {
823865
result {
824866
... on OrganizationResult {
825867
status
868+
organization {
869+
name
870+
}
826871
}
827872
... on OrganizationError {
828873
code
@@ -908,6 +953,9 @@ describe('removing an organization', () => {
908953
result {
909954
... on OrganizationResult {
910955
status
956+
organization {
957+
name
958+
}
911959
}
912960
... on OrganizationError {
913961
code
@@ -944,6 +992,9 @@ describe('removing an organization', () => {
944992
removeOrganization: {
945993
result: {
946994
status: 'todo',
995+
organization: {
996+
name: 'Secrétariat du Conseil Trésor du Canada',
997+
},
947998
},
948999
},
9491000
},
@@ -967,6 +1018,9 @@ describe('removing an organization', () => {
9671018
result {
9681019
... on OrganizationResult {
9691020
status
1021+
organization {
1022+
name
1023+
}
9701024
}
9711025
... on OrganizationError {
9721026
code
@@ -1060,6 +1114,9 @@ describe('removing an organization', () => {
10601114
result {
10611115
... on OrganizationResult {
10621116
status
1117+
organization {
1118+
name
1119+
}
10631120
}
10641121
... on OrganizationError {
10651122
code
@@ -1183,6 +1240,9 @@ describe('removing an organization', () => {
11831240
result {
11841241
... on OrganizationResult {
11851242
status
1243+
organization {
1244+
name
1245+
}
11861246
}
11871247
... on OrganizationError {
11881248
code
@@ -1256,6 +1316,9 @@ describe('removing an organization', () => {
12561316
result {
12571317
... on OrganizationResult {
12581318
status
1319+
organization {
1320+
name
1321+
}
12591322
}
12601323
... on OrganizationError {
12611324
code
@@ -1363,6 +1426,9 @@ describe('removing an organization', () => {
13631426
result {
13641427
... on OrganizationResult {
13651428
status
1429+
organization {
1430+
name
1431+
}
13661432
}
13671433
... on OrganizationError {
13681434
code
@@ -1432,6 +1498,9 @@ describe('removing an organization', () => {
14321498
result {
14331499
... on OrganizationResult {
14341500
status
1501+
organization {
1502+
name
1503+
}
14351504
}
14361505
... on OrganizationError {
14371506
code
@@ -1501,6 +1570,9 @@ describe('removing an organization', () => {
15011570
result {
15021571
... on OrganizationResult {
15031572
status
1573+
organization {
1574+
name
1575+
}
15041576
}
15051577
... on OrganizationError {
15061578
code
@@ -1578,6 +1650,9 @@ describe('removing an organization', () => {
15781650
result {
15791651
... on OrganizationResult {
15801652
status
1653+
organization {
1654+
name
1655+
}
15811656
}
15821657
... on OrganizationError {
15831658
code
@@ -1701,6 +1776,9 @@ describe('removing an organization', () => {
17011776
result {
17021777
... on OrganizationResult {
17031778
status
1779+
organization {
1780+
name
1781+
}
17041782
}
17051783
... on OrganizationError {
17061784
code
@@ -1773,6 +1851,9 @@ describe('removing an organization', () => {
17731851
result {
17741852
... on OrganizationResult {
17751853
status
1854+
organization {
1855+
name
1856+
}
17761857
}
17771858
... on OrganizationError {
17781859
code
@@ -1879,6 +1960,9 @@ describe('removing an organization', () => {
18791960
result {
18801961
... on OrganizationResult {
18811962
status
1963+
organization {
1964+
name
1965+
}
18821966
}
18831967
... on OrganizationError {
18841968
code
@@ -1944,6 +2028,9 @@ describe('removing an organization', () => {
19442028
result {
19452029
... on OrganizationResult {
19462030
status
2031+
organization {
2032+
name
2033+
}
19472034
}
19482035
... on OrganizationError {
19492036
code
@@ -2009,6 +2096,9 @@ describe('removing an organization', () => {
20092096
result {
20102097
... on OrganizationResult {
20112098
status
2099+
organization {
2100+
name
2101+
}
20122102
}
20132103
... on OrganizationError {
20142104
code

0 commit comments

Comments
 (0)