| @@ -63,6 +63,7 @@ describe('adding + getting from all orgs', () => { | ||||
|                 "country": null, | ||||
|                 "postalcode": null, | ||||
|             }, | ||||
|             "registrationEnabled": false, | ||||
|             "teams": [] | ||||
|         }) | ||||
|     }); | ||||
| @@ -96,6 +97,7 @@ describe('adding + getting explicitly', () => { | ||||
|                 "country": null, | ||||
|                 "postalcode": null, | ||||
|             }, | ||||
|             "registrationEnabled": false, | ||||
|             "teams": [] | ||||
|         }) | ||||
|     }); | ||||
|   | ||||
| @@ -51,6 +51,7 @@ describe('adding + deletion (successfull)', () => { | ||||
|                 "country": null, | ||||
|                 "postalcode": null, | ||||
|             }, | ||||
|             "registrationEnabled": false, | ||||
|             "teams": [] | ||||
|         }); | ||||
|     }); | ||||
| @@ -134,6 +135,7 @@ describe('adding + deletion with teams still existing (with force)', () => { | ||||
|                 "country": null, | ||||
|                 "postalcode": null, | ||||
|             }, | ||||
|             "registrationEnabled": false, | ||||
|         }); | ||||
|     }); | ||||
|     it('check if org really was deleted', async () => { | ||||
|   | ||||
| @@ -49,6 +49,7 @@ describe('adding + updating name', () => { | ||||
|                 "country": null, | ||||
|                 "postalcode": null, | ||||
|             }, | ||||
|             "registrationEnabled": false, | ||||
|             "teams": [] | ||||
|         }) | ||||
|     }); | ||||
| @@ -116,6 +117,7 @@ describe('adding + updateing address valid)', () => { | ||||
|                 "country": "Burkina Faso", | ||||
|                 "postalcode": "90174" | ||||
|             }, | ||||
|             "registrationEnabled": false, | ||||
|             "teams": [] | ||||
|         }); | ||||
|     }); | ||||
| @@ -145,6 +147,7 @@ describe('adding + updateing address valid)', () => { | ||||
|                 "country": "Burkina Faso", | ||||
|                 "postalcode": "90174" | ||||
|             }, | ||||
|             "registrationEnabled": false, | ||||
|             "teams": [] | ||||
|         }); | ||||
|     }); | ||||
| @@ -174,6 +177,7 @@ describe('adding + updateing address valid)', () => { | ||||
|                 "country": "Burkina Faso", | ||||
|                 "postalcode": "90174" | ||||
|             }, | ||||
|             "registrationEnabled": false, | ||||
|             "teams": [] | ||||
|         }); | ||||
|     }); | ||||
| @@ -203,6 +207,7 @@ describe('adding + updateing address valid)', () => { | ||||
|                 "country": "Burkina Faso", | ||||
|                 "postalcode": "90174" | ||||
|             }, | ||||
|             "registrationEnabled": false, | ||||
|             "teams": [] | ||||
|         }); | ||||
|     }); | ||||
| @@ -232,6 +237,7 @@ describe('adding + updateing address valid)', () => { | ||||
|                 "country": "Germany", | ||||
|                 "postalcode": "90174" | ||||
|             }, | ||||
|             "registrationEnabled": false, | ||||
|             "teams": [] | ||||
|         }); | ||||
|     }); | ||||
| @@ -261,14 +267,15 @@ describe('adding + updateing address valid)', () => { | ||||
|                 "country": "Germany", | ||||
|                 "postalcode": "91065" | ||||
|             }, | ||||
|             "registrationEnabled": false, | ||||
|             "teams": [] | ||||
|         }); | ||||
|     }); | ||||
|     it('removing org\'s should return 200', async () => { | ||||
|     it('removing org\'s address should return 200', async () => { | ||||
|         const res = await axios.put(base + '/api/organisations/' + added_org_id, { | ||||
|             "id": added_org_id, | ||||
|             "name": "testlelele", | ||||
|             "contact": null | ||||
|             "contact": null, | ||||
|         }, axios_config); | ||||
|         expect(res.status).toEqual(200); | ||||
|         expect(res.headers['content-type']).toContain("application/json"); | ||||
| @@ -283,6 +290,7 @@ describe('adding + updateing address valid)', () => { | ||||
|                 "country": null, | ||||
|                 "postalcode": null | ||||
|             }, | ||||
|             "registrationEnabled": false, | ||||
|             "teams": [] | ||||
|         }); | ||||
|     }); | ||||
|   | ||||
| @@ -120,11 +120,13 @@ describe('add+update parent org (valid)', () => { | ||||
|     it('update team', async () => { | ||||
|         added_team.parentGroup = added_org2.id; | ||||
|         const res4 = await axios.put(base + '/api/teams/' + added_team_id, added_team, axios_config); | ||||
|         let updated_team = res4.data; | ||||
|         expect(res4.status).toEqual(200); | ||||
|         expect(res4.headers['content-type']).toContain("application/json") | ||||
|         delete added_org2.contact; | ||||
|         delete added_org2.teams; | ||||
|         expect(updated_team.parentGroup).toEqual(added_org2) | ||||
|         delete added_org2.registrationEnabled; | ||||
|         delete res4.data.parentGroup.key; | ||||
|         delete res4.data.parentGroup.registrationEnabled; | ||||
|         expect(res4.data.parentGroup).toEqual(added_org2) | ||||
|     }); | ||||
| }); | ||||
| @@ -17,11 +17,11 @@ beforeAll(async () => { | ||||
| describe('Update runner name after adding', () => { | ||||
|     let added_org; | ||||
|     let added_runner; | ||||
|     let updated_runner; | ||||
|     it('creating a new org with just a name should return 200', async () => { | ||||
|         const res1 = await axios.post(base + '/api/organisations', { | ||||
|             "name": "test123" | ||||
|         }, axios_config); | ||||
|         delete res1.data.registrationEnabled; | ||||
|         added_org = res1.data | ||||
|         expect(res1.status).toEqual(200); | ||||
|         expect(res1.headers['content-type']).toContain("application/json") | ||||
| @@ -43,11 +43,13 @@ describe('Update runner name after adding', () => { | ||||
|         const res3 = await axios.put(base + '/api/runners/' + added_runner.id, runnercopy, axios_config); | ||||
|         expect(res3.status).toEqual(200); | ||||
|         expect(res3.headers['content-type']).toContain("application/json") | ||||
|         updated_runner = res3.data; | ||||
|         delete added_org.contact; | ||||
|         delete added_org.teams; | ||||
|         runnercopy.group = added_org; | ||||
|         expect(updated_runner).toEqual(runnercopy); | ||||
|         delete res3.data.group.key; | ||||
|         delete res3.data.group.registrationEnabled; | ||||
|         delete runnercopy.group.registrationEnabled; | ||||
|         expect(res3.data).toEqual(runnercopy); | ||||
|     }); | ||||
| }); | ||||
| // --------------- | ||||
| @@ -86,9 +88,12 @@ describe('Update runner group after adding', () => { | ||||
|     }); | ||||
|     it('valid group update should return 200', async () => { | ||||
|         added_runner.group = added_org_2.id; | ||||
|         delete added_org_2.registrationEnabled; | ||||
|         const res3 = await axios.put(base + '/api/runners/' + added_runner.id, added_runner, axios_config); | ||||
|         expect(res3.status).toEqual(200); | ||||
|         expect(res3.headers['content-type']).toContain("application/json") | ||||
|         delete res3.data.group.key; | ||||
|         delete res3.data.group.registrationEnabled; | ||||
|         expect(res3.data.group).toEqual(added_org_2); | ||||
|     }); | ||||
| }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user