Implemented group contacts feature/104-contacts #108
@ -73,8 +73,8 @@ describe('add+delete (with org)', () => {
|
|||||||
const res = await axios.delete(base + '/api/contacts/' + added_contact.id, axios_config);
|
const res = await axios.delete(base + '/api/contacts/' + added_contact.id, axios_config);
|
||||||
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")
|
||||||
let deleted_contact = res.data
|
delete res.data.groups[0].contact;
|
||||||
expect(deleted_contact).toEqual(added_contact);
|
expect(res.data).toEqual(added_contact);
|
||||||
});
|
});
|
||||||
it('check if contact really was deleted', async () => {
|
it('check if contact really was deleted', async () => {
|
||||||
const res = await axios.get(base + '/api/contacts/' + added_contact.id, axios_config);
|
const res = await axios.get(base + '/api/contacts/' + added_contact.id, axios_config);
|
||||||
@ -122,8 +122,8 @@ describe('add+delete (with team)', () => {
|
|||||||
const res = await axios.delete(base + '/api/contacts/' + added_contact.id, axios_config);
|
const res = await axios.delete(base + '/api/contacts/' + added_contact.id, axios_config);
|
||||||
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")
|
||||||
let deleted_contact = res.data
|
delete res.data.groups[0].contact;
|
||||||
expect(deleted_contact).toEqual(added_contact);
|
expect(res.data).toEqual(added_contact);
|
||||||
});
|
});
|
||||||
it('check if contact really was deleted', async () => {
|
it('check if contact really was deleted', async () => {
|
||||||
const res = await axios.get(base + '/api/contacts/' + added_contact.id, axios_config);
|
const res = await axios.get(base + '/api/contacts/' + added_contact.id, axios_config);
|
||||||
@ -171,8 +171,9 @@ describe('add+delete (with org&team)', () => {
|
|||||||
const res = await axios.delete(base + '/api/contacts/' + added_contact.id, axios_config);
|
const res = await axios.delete(base + '/api/contacts/' + added_contact.id, axios_config);
|
||||||
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")
|
||||||
let deleted_contact = res.data
|
delete res.data.groups[0].contact;
|
||||||
expect(deleted_contact).toEqual(added_contact);
|
delete res.data.groups[1].contact;
|
||||||
|
expect(res.data).toEqual(added_contact);
|
||||||
});
|
});
|
||||||
it('check if contact really was deleted', async () => {
|
it('check if contact really was deleted', async () => {
|
||||||
const res = await axios.get(base + '/api/contacts/' + added_contact.id, axios_config);
|
const res = await axios.get(base + '/api/contacts/' + added_contact.id, axios_config);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user