Adjusted tests for the new responseType parameter (part 2)

ref #132
This commit is contained in:
Nicolai Ort 2021-01-30 15:39:39 +01:00
parent bcc15e4286
commit ff8af090e3
5 changed files with 5 additions and 2 deletions

View File

@ -210,6 +210,7 @@ describe('Update contact group invalid after adding (should fail)', () => {
expect(res.status).toEqual(200); expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json"); expect(res.headers['content-type']).toContain("application/json");
added_contact = res.data added_contact = res.data
delete res.data.groups[0].teams;
expect(res.data).toEqual({ expect(res.data).toEqual({
"id": res.data.id, "id": res.data.id,
"firstname": "first", "firstname": "first",

View File

@ -323,7 +323,7 @@ describe('adding + updating distance donation valid', () => {
"amountPerDistance": 69, "amountPerDistance": 69,
"donor": added_donor.id "donor": added_donor.id
}, axios_config); }, axios_config);
delete res.data.runner.group; delete res.data.runner;
expect(res.status).toEqual(200); expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json"); expect(res.headers['content-type']).toContain("application/json");
expect(res.data.runner).toEqual(added_runner2); expect(res.data.runner).toEqual(added_runner2);

View File

@ -229,7 +229,6 @@ describe('adding + updateing address valid)', () => {
expect(res.data).toEqual({ expect(res.data).toEqual({
"id": added_org_id, "id": added_org_id,
"name": "testlelele", "name": "testlelele",
"contact": null,
"address": { "address": {
"address1": "Test2", "address1": "Test2",
"address2": "Test3", "address2": "Test3",

View File

@ -127,6 +127,7 @@ describe('add+update parent org (valid)', () => {
delete added_org2.registrationEnabled; delete added_org2.registrationEnabled;
delete res4.data.parentGroup.key; delete res4.data.parentGroup.key;
delete res4.data.parentGroup.registrationEnabled; delete res4.data.parentGroup.registrationEnabled;
delete res4.data.parentGroup.teams;
expect(res4.data.parentGroup).toEqual(added_org2) expect(res4.data.parentGroup).toEqual(added_org2)
}); });
}); });

View File

@ -49,6 +49,7 @@ describe('Update runner name after adding', () => {
delete res3.data.group.key; delete res3.data.group.key;
delete res3.data.group.registrationEnabled; delete res3.data.group.registrationEnabled;
delete runnercopy.group.registrationEnabled; delete runnercopy.group.registrationEnabled;
delete res3.data.group.teams;
expect(res3.data).toEqual(runnercopy); expect(res3.data).toEqual(runnercopy);
}); });
}); });
@ -94,6 +95,7 @@ describe('Update runner group after adding', () => {
expect(res3.headers['content-type']).toContain("application/json") expect(res3.headers['content-type']).toContain("application/json")
delete res3.data.group.key; delete res3.data.group.key;
delete res3.data.group.registrationEnabled; delete res3.data.group.registrationEnabled;
delete res3.data.group.teams;
expect(res3.data.group).toEqual(added_org_2); expect(res3.data.group).toEqual(added_org_2);
}); });
}); });