parent
ff8af090e3
commit
8dc2810c0c
|
@ -136,6 +136,7 @@ describe('POST /api/contacts working (with group)', () => {
|
|||
expect(res.status).toEqual(200);
|
||||
expect(res.headers['content-type']).toContain("application/json");
|
||||
delete res.data.id;
|
||||
delete res.data.groups[0].teams;
|
||||
expect(res.data).toEqual({
|
||||
"firstname": "first",
|
||||
"middlename": null,
|
||||
|
@ -189,6 +190,7 @@ describe('POST /api/contacts working (with group)', () => {
|
|||
expect(res.headers['content-type']).toContain("application/json");
|
||||
added_contact = res.data
|
||||
delete res.data.id;
|
||||
delete res.data.groups[0].teams;
|
||||
expect(res.data).toEqual({
|
||||
"firstname": "first",
|
||||
"middlename": null,
|
||||
|
|
|
@ -86,7 +86,8 @@ describe('Update contact group after adding (should work)', () => {
|
|||
}, axios_config);
|
||||
expect(res.status).toEqual(200);
|
||||
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({
|
||||
"id": res.data.id,
|
||||
"firstname": "first",
|
||||
|
@ -141,6 +142,7 @@ describe('Update contact group after adding (should work)', () => {
|
|||
}, axios_config);
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers['content-type']).toContain("application/json");
|
||||
delete res.data.groups[0].teams;
|
||||
expect(res.data).toEqual({
|
||||
"id": res.data.id,
|
||||
"firstname": "first",
|
||||
|
|
|
@ -323,7 +323,6 @@ describe('adding + updating distance donation valid', () => {
|
|||
"amountPerDistance": 69,
|
||||
"donor": added_donor.id
|
||||
}, axios_config);
|
||||
delete res.data.runner;
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers['content-type']).toContain("application/json");
|
||||
expect(res.data.runner).toEqual(added_runner2);
|
||||
|
|
|
@ -17,7 +17,6 @@ beforeAll(async () => {
|
|||
describe('GET /api/runners', () => {
|
||||
it('basic get should return 200', async () => {
|
||||
const res = await axios.get(base + '/api/runners', axios_config);
|
||||
console.log(res.data)
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
|
|
|
@ -129,9 +129,8 @@ describe('GET /api/teams/:id/runners after adding', () => {
|
|||
expect(res.status).toEqual(200);
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('check if scans was added via the orgs/runners endpoint.', async () => {
|
||||
it('check if runner was added via the teams/runners endpoint.', async () => {
|
||||
const res = await axios.get(base + '/api/teams/' + added_team.id + "/runners", axios_config);
|
||||
console.log(res.data);
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers['content-type']).toContain("application/json");
|
||||
expect(res.data).toContainEqual(added_runner);
|
||||
|
|
|
@ -72,7 +72,7 @@ describe('adding + getting scans', () => {
|
|||
expect(res.status).toEqual(200);
|
||||
expect(res.headers['content-type']).toContain("application/json");
|
||||
added_scan.runner.distance = 0;
|
||||
added_scan.runner.group = added_org;
|
||||
delete added_scan.runner.group;
|
||||
expect(res.data).toContainEqual(added_scan);
|
||||
});
|
||||
});
|
|
@ -242,7 +242,6 @@ describe('POST /api/scans successfully via scan station', () => {
|
|||
headers: { "authorization": "Bearer " + added_station.key },
|
||||
validateStatus: undefined
|
||||
});
|
||||
console.log(res.data)
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers['content-type']).toContain("application/json");
|
||||
expect(res.data.valid).toEqual(false);
|
||||
|
|
Loading…
Reference in New Issue