Alpha Release 0.3.0 #122

Merged
niggl merged 42 commits from dev into main 2021-01-24 17:57:38 +00:00
Showing only changes of commit 72941da1cb - Show all commits

View File

@ -64,3 +64,33 @@ describe('register invalid citizen', () => {
expect(res.headers['content-type']).toContain("application/json");
});
});
// ---------------
describe('register citizen valid', () => {
it('registering as citizen with minimal params should return 200', async () => {
const res = await axios.post(base + '/api/runners/register', {
"firstname": "string",
"lastname": "string",
"email": "user@example.com"
}, axios_config);
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json");
});
it('registering as citizen with all params should return 200', async () => {
const res = await axios.post(base + '/api/runners/register', {
"firstname": "string",
"middlename": "string",
"lastname": "string",
"email": "user@example.com",
"phone": "+4909132123456",
"address": {
address1: "Teststreet 1",
address2: "Testapartement",
postalcode: "91074",
city: "Herzo",
country: "Germany"
}
}, axios_config);
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json");
});
});