Removed total distance from tests

ref #78
This commit is contained in:
Nicolai Ort 2021-01-09 14:24:16 +01:00
parent e1ce052d3c
commit 3ceb5a0c0f
2 changed files with 10 additions and 0 deletions

View File

@ -84,6 +84,7 @@ describe('POST /api/scans successfully', () => {
"group": added_org.id
}, axios_config);
delete res2.data.group;
delete res2.data.distance;
added_runner = res2.data;
expect(res2.status).toEqual(200);
expect(res2.headers['content-type']).toContain("application/json")
@ -96,6 +97,7 @@ describe('POST /api/scans successfully', () => {
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json");
delete res.data.id;
delete res.data.runner.distance;
expect(res.data).toEqual({
"runner": added_runner,
"distance": 200,
@ -111,6 +113,7 @@ describe('POST /api/scans successfully', () => {
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json");
delete res.data.id;
delete res.data.runner.distance;
expect(res.data).toEqual({
"runner": added_runner,
"distance": 200,
@ -126,6 +129,7 @@ describe('POST /api/scans successfully', () => {
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json");
delete res.data.id;
delete res.data.runner.distance;
expect(res.data).toEqual({
"runner": added_runner,
"distance": 200,
@ -154,6 +158,7 @@ describe('POST /api/scans successfully via scan station', () => {
"group": added_org.id
}, axios_config);
delete res2.data.group;
delete res2.data.distance;
added_runner = res2.data;
expect(res2.status).toEqual(200);
expect(res2.headers['content-type']).toContain("application/json")
@ -186,6 +191,7 @@ describe('POST /api/scans successfully via scan station', () => {
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json");
delete res.data.id;
delete res.data.runner.distance;
expect(res.data).toEqual({
"runner": added_runner,
"distance": 200,
@ -204,6 +210,7 @@ describe('POST /api/scans successfully via scan station', () => {
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json");
delete res.data.id;
delete res.data.runner.distance;
expect(res.data).toEqual({
"runner": added_runner,
"distance": 200,
@ -222,6 +229,7 @@ describe('POST /api/scans successfully via scan station', () => {
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json");
delete res.data.id;
delete res.data.runner.distance;
expect(res.data).toEqual({
"runner": added_runner,
"distance": 200,

View File

@ -44,6 +44,7 @@ describe('DELETE scan', () => {
"distance": 1000
}, axios_config);
added_scan = res.data;
delete res.data.runner.distance;
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json")
});
@ -51,6 +52,7 @@ describe('DELETE scan', () => {
const res2 = await axios.delete(base + '/api/scans/' + added_scan.id, axios_config);
expect(res2.status).toEqual(200);
expect(res2.headers['content-type']).toContain("application/json")
delete res2.data.runner.distance;
expect(res2.data).toEqual(added_scan);
});
it('check if scan really was deleted', async () => {