@@ -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");
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user