Added donor add test for address needed error

ref #65
This commit is contained in:
Nicolai Ort 2021-01-02 19:12:02 +01:00
parent e4c1930dd1
commit f9e314bf9f
1 changed files with 10 additions and 0 deletions

View File

@ -60,6 +60,16 @@ describe('POST /api/donors with errors', () => {
expect(res2.status).toEqual(400);
expect(res2.headers['content-type']).toContain("application/json")
});
it('creating a new donor without an address but with receiptNeeded=true 406', async () => {
const res2 = await axios.post(base + '/api/donors', {
"firstname": "string",
"middlename": "string",
"lastname": "string",
"receiptNeeded": true
}, axios_config);
expect(res2.status).toEqual(406);
expect(res2.headers['content-type']).toContain("application/json")
});
});
// ---------------
describe('POST /api/donors working', () => {